Mercurial > dovecot > core-2.2
changeset 15491:a1b814081f0c
json-parser: Fixed infinite looping in some situations.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 19 Dec 2012 14:41:01 +0200 |
parents | 0c9a4af8eaf8 |
children | cd093d05037e |
files | src/lib/json-parser.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/json-parser.c Wed Dec 19 14:39:55 2012 +0200 +++ b/src/lib/json-parser.c Wed Dec 19 14:41:01 2012 +0200 @@ -546,7 +546,8 @@ /* parsing probably failed because there wasn't enough input. reset the error and try reading more. */ parser->error = NULL; - + parser->highwater_offset = parser->input->v_offset + + i_stream_get_data_size(parser->input); } return ret; } @@ -623,6 +624,8 @@ /* parsing probably failed because there wasn't enough input. reset the error and try reading more. */ parser->error = NULL; + parser->highwater_offset = parser->input->v_offset + + i_stream_get_data_size(parser->input); } return ret; }