Check the bound first.

Found with cppcheck.
This commit is contained in:
Emil Mikulic 2015-05-20 00:06:59 +10:00
parent 1c5fdb5607
commit 02b02a7615

View File

@ -1461,9 +1461,9 @@ static char *parse_field(const struct connection *conn, const char *field) {
/* find end */ /* find end */
for (bound2 = bound1; for (bound2 = bound1;
((conn->request[bound2] != '\r') && ((bound2 < conn->request_length) &&
(conn->request[bound2] != '\n') && (conn->request[bound2] != '\r') &&
(bound2 < conn->request_length)); (conn->request[bound2] != '\n'));
bound2++) bound2++)
; ;