]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib: Fixed json-parser to correctly parse numbers at EOF.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 1 Feb 2016 15:30:23 +0000 (17:30 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 1 Feb 2016 15:45:48 +0000 (17:45 +0200)
commit4bfa47e475c957adfc645047660d8ce96a3371a7
treebaa41b27413704048021b643f999a7eb9ef400ec
parent736b1800b0409ba7443d33ecb8d0fb9f8b091660
lib: Fixed json-parser to correctly parse numbers at EOF.

Numbers are a bit special compared to others, because they don't have any
clear character indicating that the number ends. So we can only assume that
the number is finished when EOF is reached, although even that isn't
necessarily correct in case the stream is terminated unexpectedly.

This change is in prepartion for the next change. With current JSON parser
this issue could never happen because "}" was expected just before EOF.
src/lib/json-parser.c