1
0
Fork 0

Fix: Consider extra arguments in HTTP request line invalid

This commit is contained in:
Philipp Schafft 2018-09-12 09:26:59 +00:00
parent 368fbd4442
commit 09fb1ce137
1 changed files with 5 additions and 0 deletions

View File

@ -386,6 +386,11 @@ int httpp_parse(http_parser_t *parser, const char *http_data, unsigned long len)
case 2:
version = &line[0][i];
break;
case 3:
/* There is an extra element in the request line. This is not HTTP. */
free(data);
return 0;
break;
}
}
}