1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

Subject: [PATCH] Fix bug parsing unknown headers.

Bug was introduced in 49f72aa45.
This commit is contained in:
Drew Noakes 2015-01-30 12:04:43 +00:00 committed by Andy Green
parent 229bfec948
commit 2121e8a7fc

View file

@ -422,8 +422,11 @@ swallow:
* treat as dangerous
*/
lwsl_info("Unknown method - dropping\n");
return -1;
if (m == ARRAY_SIZE(methods)) {
lwsl_info("Unknown method - dropping\n");
return -1;
}
break;
}
if (lextable[wsi->u.hdr.lextable_pos] < FAIL_CHAR) {
/* terminal state */