mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
win32: zlib: Fix buffer overflow on inflate (CVE-2022-37434)
This commit is contained in:
parent
a1ee5a2c50
commit
a544db3020
1 changed files with 3 additions and 2 deletions
|
@ -720,8 +720,9 @@ int flush;
|
|||
if (copy > have) copy = have;
|
||||
if (copy) {
|
||||
if (state->head != Z_NULL &&
|
||||
state->head->extra != Z_NULL) {
|
||||
len = state->head->extra_len - state->length;
|
||||
state->head->extra != Z_NULL &&
|
||||
(len = state->head->extra_len - state->length) <
|
||||
state->head->extra_max) {
|
||||
zmemcpy(state->head->extra + len, next,
|
||||
len + copy > state->head->extra_max ?
|
||||
state->head->extra_max - len : copy);
|
||||
|
|
Loading…
Add table
Reference in a new issue