Mercurial > dovecot > core-2.2
changeset 22480:57b725e7920b
lib-http: Fixed bug in date parser: sometimes read one byte past end of input.
This caused spurious parse errors.
author | Stephan Bosch <stephan.bosch@dovecot.fi> |
---|---|
date | Thu, 27 Jul 2017 16:30:20 +0200 |
parents | 90957875c55b |
children | 658e239267b2 |
files | src/lib-http/http-date.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-http/http-date.c Thu Jul 27 16:03:44 2017 +0200 +++ b/src/lib-http/http-date.c Thu Jul 27 16:30:20 2017 +0200 @@ -140,8 +140,8 @@ str_append_c(word, parser->cur[0]); parser->cur++; } - - if (i_isalpha(parser->cur[0])) + + if (parser->cur < parser->end && i_isalpha(parser->cur[0])) return -1; *word_r = word; return 1;