mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
Check the bound first.
Found with cppcheck.
This commit is contained in:
parent
1c5fdb5607
commit
02b02a7615
@ -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++)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user