mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
ws: server: limit string check length for tokenizer on upgrade
This commit is contained in:
parent
431e4e82e1
commit
4e7cefb006
1 changed files with 1 additions and 1 deletions
|
@ -422,7 +422,7 @@ lws_process_ws_upgrade(struct lws *wsi)
|
|||
e = lws_tokenize(&ts);
|
||||
switch (e) {
|
||||
case LWS_TOKZE_TOKEN:
|
||||
if (!strcasecmp(ts.token, "upgrade"))
|
||||
if (!strncasecmp(ts.token, "upgrade", ts.token_len))
|
||||
e = LWS_TOKZE_ENDED;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue