On Fri, Aug 5, 2016 at 1:25 PM, Yann Ylavic <[email protected]> wrote: > On Fri, Aug 5, 2016 at 11:08 AM, <[email protected]> wrote: >> >> - if (field[1] != '\0') { >> - /* ...and leading whitespace on an obs-fold line can be >> - * similarly discarded */ >> - while (field[1] == '\t' || field[1] == ' ') { >> - ++field; --len; >> - } >> + if (field[1] == '\0') { >> + r->status = HTTP_BAD_REQUEST; >> + ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r, APLOGNO(03443) >> + "Empty folded line encountered"); >> + return; >> + } >> + >> + /* Leading whitespace on an obs-fold line can be >> + * similarly discarded */ >> + while (field[1] == '\t' || field[1] == ' ') { >> + ++field; --len; >> } > > Empty folded line can still happen here (after discarding obs-fold spaces).
Hmm no, sorry for the noise, trailing spaces discarding above would have set field[1] = '\0'.
