diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-03-30 22:35:37 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-07-15 22:23:47 -0400 |
commit | 851d4e2a67efb2c8777df151b697391ff1a76af0 (patch) | |
tree | 2982a963e3032fa7e9ec23b53669e7fc2add5c92 /src/journal-remote/journal-remote-parse.h | |
parent | 5c879495eab608bf9b6e7bec1020d916a0503b6e (diff) |
journal-remote: reject fields above maximum size
Also fix an infinite loop on E2BIG.
Remember what range we already scanned for '\n', to avoid
quadratic behaviour on long "text" fields.
Diffstat (limited to 'src/journal-remote/journal-remote-parse.h')
-rw-r--r-- | src/journal-remote/journal-remote-parse.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/journal-remote/journal-remote-parse.h b/src/journal-remote/journal-remote-parse.h index c1506d118d..2b6c24ef3a 100644 --- a/src/journal-remote/journal-remote-parse.h +++ b/src/journal-remote/journal-remote-parse.h @@ -38,6 +38,7 @@ typedef struct RemoteSource { char *buf; size_t size; + size_t scanned; size_t filled; size_t data_size; |