Skip to content

Commit fd9ce2a

Browse files
committed
may read beyond buffer (fixed)
1 parent 25ea317 commit fd9ce2a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/core/http_parse.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static inline state_action http_read_requeststartmethod(int epfd, cache_connecti
202202
RBUF_READMOVE(connection->input, n + 1);
203203
return needs_more;
204204
}
205-
else if (n == 4 && (rbuf_cmpn(&connection->input, "BULK", 4) == 0 || rbuf_cmpn(&connection->input, "PURGE", 5) == 0)) {
205+
else if ((n == 4 && rbuf_cmpn(&connection->input, "BULK", 4) == 0) || (n == 5 && rbuf_cmpn(&connection->input, "PURGE", 5) == 0)) {
206206
//This is a BULK request
207207
connection->type = REQUEST_HTTPPURGE;
208208
assert(REQUEST_IS(connection->type, connection->type));

0 commit comments

Comments
 (0)