mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
h2: coverity: check for OOM on dynamic table alloc
It can fail, we should check it.
This commit is contained in:
parent
b415f59bd2
commit
1db45d17df
1 changed files with 3 additions and 2 deletions
|
@ -2437,8 +2437,9 @@ upgrade_h2c:
|
|||
|
||||
lws_h2_settings(wsi, &wsi->h2.h2n->peer_set, (uint8_t *)tbuf, n);
|
||||
|
||||
lws_hpack_dynamic_size(wsi, (int)wsi->h2.h2n->peer_set.s[
|
||||
H2SET_HEADER_TABLE_SIZE]);
|
||||
if (lws_hpack_dynamic_size(wsi, (int)wsi->h2.h2n->peer_set.s[
|
||||
H2SET_HEADER_TABLE_SIZE]))
|
||||
return 1;
|
||||
|
||||
strcpy(tbuf, "HTTP/1.1 101 Switching Protocols\x0d\x0a"
|
||||
"Connection: Upgrade\x0d\x0a"
|
||||
|
|
Loading…
Add table
Reference in a new issue