diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-05-13 14:07:56 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-05-13 14:07:56 (GMT) |
commit | 9116440cfe8bf52e4ef8174ab27f688247156c00 (patch) | |
tree | 3049d1611ed52b83d19fcb4a6a67338bd98ce56e /compat/zlib/contrib/puff/puff.c | |
parent | 1ca1aefb24495d43ae986af6c1a2ad1fa5bf22ce (diff) | |
download | tcl-9116440cfe8bf52e4ef8174ab27f688247156c00.zip tcl-9116440cfe8bf52e4ef8174ab27f688247156c00.tar.gz tcl-9116440cfe8bf52e4ef8174ab27f688247156c00.tar.bz2 |
Upgrade to zlib 1.2.8
Diffstat (limited to 'compat/zlib/contrib/puff/puff.c')
-rw-r--r-- | compat/zlib/contrib/puff/puff.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compat/zlib/contrib/puff/puff.c b/compat/zlib/contrib/puff/puff.c index df8470c..ba58483 100644 --- a/compat/zlib/contrib/puff/puff.c +++ b/compat/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 */ |