You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we feed multipart parser 1 byte in a time (call multipart_parser_execute() with len == 1) following code:
case s_header_value:
multipart_log("s_header_value");
if (c == CR) {
EMIT_DATA_CB(header_value, buf + mark, i - mark);
p->state = s_header_value_almost_done;
}
if (is_last)
EMIT_DATA_CB(header_value, buf + mark, (i - mark) + 1);
break;
call on_header_value callback twice: first time with len == 0 (which is feature - indicates end of value) and second time with len == 1 and buffer[0] == CR which is bug.
Looks like we missing else statement:
multipart_log("s_header_value");
if (c == CR) {
EMIT_DATA_CB(header_value, buf + mark, i - mark);
p->state = s_header_value_almost_done;
} else if (is_last)
EMIT_DATA_CB(header_value, buf + mark, (i - mark) + 1);
or break:
multipart_log("s_header_value");
if (c == CR) {
EMIT_DATA_CB(header_value, buf + mark, i - mark);
p->state = s_header_value_almost_done;
break;
}
if (is_last)
EMIT_DATA_CB(header_value, buf + mark, (i - mark) + 1);
The text was updated successfully, but these errors were encountered:
If we feed multipart parser 1 byte in a time (call multipart_parser_execute() with len == 1) following code:
call on_header_value callback twice: first time with len == 0 (which is feature - indicates end of value) and second time with len == 1 and buffer[0] == CR which is bug.
Looks like we missing else statement:
or break:
The text was updated successfully, but these errors were encountered: