diff options
author | marha <marha@users.sourceforge.net> | 2013-11-12 13:55:55 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-11-12 13:56:28 +0100 |
commit | 0e01270aeda311bf52c046f6a68e8b3e1fa86cb8 (patch) | |
tree | eee062f34219e5c5d3f3e61caa5d3c39a5185794 /zlib/contrib/puff/puff.c | |
parent | 3893ee9f6b12465239b63d08763bd9ba0bd329e5 (diff) | |
parent | 4bdf8409331f44417c3622bc5ec0e42c0e68afb6 (diff) | |
download | vcxsrv-0e01270aeda311bf52c046f6a68e8b3e1fa86cb8.tar.gz vcxsrv-0e01270aeda311bf52c046f6a68e8b3e1fa86cb8.tar.bz2 vcxsrv-0e01270aeda311bf52c046f6a68e8b3e1fa86cb8.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
Updated zlib to 1.2.8
Conflicts:
zlib/win32/zlib.def
Diffstat (limited to 'zlib/contrib/puff/puff.c')
-rw-r--r-- | zlib/contrib/puff/puff.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/zlib/contrib/puff/puff.c b/zlib/contrib/puff/puff.c index df8470c93..ba58483d5 100644 --- a/zlib/contrib/puff/puff.c +++ b/zlib/contrib/puff/puff.c @@ -1,8 +1,8 @@ /* * puff.c - * Copyright (C) 2002-2010 Mark Adler + * Copyright (C) 2002-2013 Mark Adler * For conditions of distribution and use, see copyright notice in puff.h - * version 2.2, 25 Apr 2010 + * version 2.3, 21 Jan 2013 * * puff.c is a simple inflate written to be an unambiguous way to specify the * deflate format. It is not written for speed but rather simplicity. As a @@ -76,6 +76,7 @@ * - Move NIL to puff.h * - Allow incomplete code only if single code length is 1 * - Add full code coverage test to Makefile + * 2.3 21 Jan 2013 - Check for invalid code length codes in dynamic blocks */ #include <setjmp.h> /* for setjmp(), longjmp(), and jmp_buf */ @@ -704,6 +705,8 @@ local int dynamic(struct state *s) int len; /* last length to repeat */ symbol = decode(s, &lencode); + if (symbol < 0) + return symbol; /* invalid symbol */ if (symbol < 16) /* length in 0..15 */ lengths[index++] = symbol; else { /* repeat instruction */ |