From e7baa6764f8fdfcb93a0d0125039ec69c0e0ecf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 29 Aug 2004 09:16:03 +0000 Subject: [PATCH] fix for CAN-2004-0797 zlib-1.2.x vulnerability (patch #1018094) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/zlib/infback.c | 3 +++ src/zlib/inflate.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/zlib/infback.c b/src/zlib/infback.c index 110b03b857..e9709984a8 100644 --- a/src/zlib/infback.c +++ b/src/zlib/infback.c @@ -434,6 +434,9 @@ void FAR *out_desc; } } + if (state->mode == BAD) + break; + /* build code tables */ state->next = state->codes; state->lencode = (code const FAR *)(state->next); diff --git a/src/zlib/inflate.c b/src/zlib/inflate.c index a53b5c7446..be67fd6920 100644 --- a/src/zlib/inflate.c +++ b/src/zlib/inflate.c @@ -861,6 +861,9 @@ int flush; } } + if (state->mode == BAD) + break; + /* build code tables */ state->next = state->codes; state->lencode = (code const FAR *)(state->next);