diff options
author | scuri <scuri> | 2009-10-20 18:12:26 +0000 |
---|---|---|
committer | scuri <scuri> | 2009-10-20 18:12:26 +0000 |
commit | a972dbb9bd731a439d009bd51e36981c41a06232 (patch) | |
tree | e4e5d0aaf23706083dfb1fe4180e18f0907a90c9 /src/pdflib/flate | |
parent | 27a4f9c4ac45ff65f941964f7351b64b1e6a9f35 (diff) |
*** empty log message ***
Diffstat (limited to 'src/pdflib/flate')
-rw-r--r-- | src/pdflib/flate/adler32.c | 4 | ||||
-rw-r--r-- | src/pdflib/flate/compress.c | 4 | ||||
-rw-r--r-- | src/pdflib/flate/crc32.c | 4 | ||||
-rw-r--r-- | src/pdflib/flate/deflate.c | 11 | ||||
-rw-r--r-- | src/pdflib/flate/deflate.h | 4 | ||||
-rw-r--r-- | src/pdflib/flate/inffast.c | 2 | ||||
-rw-r--r-- | src/pdflib/flate/inflate.c | 2 | ||||
-rw-r--r-- | src/pdflib/flate/inftrees.c | 2 | ||||
-rw-r--r-- | src/pdflib/flate/trees.c | 4 | ||||
-rw-r--r-- | src/pdflib/flate/trees.h | 2 | ||||
-rw-r--r-- | src/pdflib/flate/uncompr.c | 4 | ||||
-rw-r--r-- | src/pdflib/flate/zconf.h | 4 | ||||
-rw-r--r-- | src/pdflib/flate/zlib.h | 2 | ||||
-rw-r--r-- | src/pdflib/flate/zprefix.h | 2 | ||||
-rw-r--r-- | src/pdflib/flate/zutil.c | 4 | ||||
-rw-r--r-- | src/pdflib/flate/zutil.h | 23 |
16 files changed, 41 insertions, 37 deletions
diff --git a/src/pdflib/flate/adler32.c b/src/pdflib/flate/adler32.c index 3f309ba..6db9124 100644 --- a/src/pdflib/flate/adler32.c +++ b/src/pdflib/flate/adler32.c @@ -3,8 +3,8 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* $Id: adler32.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ -/* @(#) $Id: adler32.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* $Id: adler32.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ +/* @(#) $Id: adler32.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ #define ZLIB_INTERNAL #include "zlib.h" diff --git a/src/pdflib/flate/compress.c b/src/pdflib/flate/compress.c index 64dd6f3..a2ce19d 100644 --- a/src/pdflib/flate/compress.c +++ b/src/pdflib/flate/compress.c @@ -3,8 +3,8 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* $Id: compress.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ -/* @(#) $Id: compress.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* $Id: compress.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ +/* @(#) $Id: compress.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ #define ZLIB_INTERNAL #include "zlib.h" diff --git a/src/pdflib/flate/crc32.c b/src/pdflib/flate/crc32.c index df92f90..682fa12 100644 --- a/src/pdflib/flate/crc32.c +++ b/src/pdflib/flate/crc32.c @@ -9,8 +9,8 @@ * factor of two increase in speed on a Power PC G4 (PPC7455) using gcc -O3. */ -/* $Id: crc32.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ -/* @(#) $Id: crc32.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* $Id: crc32.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ +/* @(#) $Id: crc32.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ /* Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore diff --git a/src/pdflib/flate/deflate.c b/src/pdflib/flate/deflate.c index 5454e60..8a360ff 100644 --- a/src/pdflib/flate/deflate.c +++ b/src/pdflib/flate/deflate.c @@ -47,8 +47,8 @@ * */ -/* $Id: deflate.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ -/* @(#) $Id: deflate.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* $Id: deflate.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ +/* @(#) $Id: deflate.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ #include "deflate.h" @@ -284,10 +284,13 @@ int ZEXPORT deflateInit2_( s->hash_mask = s->hash_size - 1; s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH); - s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte)); + /* PDFlib GmbH Bug #1707: increase the buffer size by 2x2 bytes to + * avoid problems with memory access beyond the end in the assembler code + */ + s->window = (Bytef *) ZALLOC(strm, 2+s->w_size, 2*sizeof(Byte)); /* we don't use calloc -> to satisfy purify * at least here memset is needed */ - memset((void *)s->window, 0, (size_t) s->w_size * 2*sizeof(Byte)); + memset((void *)s->window, 0, (size_t) (2+s->w_size) * 2*sizeof(Byte)); s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); diff --git a/src/pdflib/flate/deflate.h b/src/pdflib/flate/deflate.h index 36e0961..98babdb 100644 --- a/src/pdflib/flate/deflate.h +++ b/src/pdflib/flate/deflate.h @@ -9,9 +9,9 @@ */ -/* $Id: deflate.h,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* $Id: deflate.h,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ -/* @(#) $Id: deflate.h,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* @(#) $Id: deflate.h,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ #ifndef DEFLATE_H #define DEFLATE_H diff --git a/src/pdflib/flate/inffast.c b/src/pdflib/flate/inffast.c index c3d8a1d..c82a597 100644 --- a/src/pdflib/flate/inffast.c +++ b/src/pdflib/flate/inffast.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2004 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ -/* $Id: inffast.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* $Id: inffast.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ #include "zutil.h" #include "inftrees.h" diff --git a/src/pdflib/flate/inflate.c b/src/pdflib/flate/inflate.c index 87cd287..bbbc11b 100644 --- a/src/pdflib/flate/inflate.c +++ b/src/pdflib/flate/inflate.c @@ -79,7 +79,7 @@ * * The history for versions after 1.2.0 are in ChangeLog in zlib distribution. */ -/* $Id: inflate.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* $Id: inflate.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ #include "zutil.h" #include "inftrees.h" diff --git a/src/pdflib/flate/inftrees.c b/src/pdflib/flate/inftrees.c index 0f67881..c780578 100644 --- a/src/pdflib/flate/inftrees.c +++ b/src/pdflib/flate/inftrees.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ -/* $Id: inftrees.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* $Id: inftrees.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ #include "zutil.h" #include "inftrees.h" diff --git a/src/pdflib/flate/trees.c b/src/pdflib/flate/trees.c index a885cd4..222a88e 100644 --- a/src/pdflib/flate/trees.c +++ b/src/pdflib/flate/trees.c @@ -29,8 +29,8 @@ * Addison-Wesley, 1983. ISBN 0-201-06672-6. */ -/* $Id: trees.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ -/* @(#) $Id: trees.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* $Id: trees.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ +/* @(#) $Id: trees.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ /* #define GEN_TREES_H */ diff --git a/src/pdflib/flate/trees.h b/src/pdflib/flate/trees.h index 3669ef9..3235571 100644 --- a/src/pdflib/flate/trees.h +++ b/src/pdflib/flate/trees.h @@ -1,7 +1,7 @@ /* header created automatically with -DGEN_TREES_H */ -/* $Id: trees.h,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* $Id: trees.h,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ local const ct_data static_ltree[L_CODES+2] = { {{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}}, diff --git a/src/pdflib/flate/uncompr.c b/src/pdflib/flate/uncompr.c index e01ad4b..1a3edfd 100644 --- a/src/pdflib/flate/uncompr.c +++ b/src/pdflib/flate/uncompr.c @@ -3,8 +3,8 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* $Id: uncompr.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ -/* @(#) $Id: uncompr.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* $Id: uncompr.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ +/* @(#) $Id: uncompr.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ #define ZLIB_INTERNAL #include "zlib.h" diff --git a/src/pdflib/flate/zconf.h b/src/pdflib/flate/zconf.h index 1e664a8..98ec1da 100644 --- a/src/pdflib/flate/zconf.h +++ b/src/pdflib/flate/zconf.h @@ -4,8 +4,8 @@ */ -/* $Id: zconf.h,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ -/* @(#) $Id: zconf.h,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* $Id: zconf.h,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ +/* @(#) $Id: zconf.h,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ #ifndef ZCONF_H #define ZCONF_H diff --git a/src/pdflib/flate/zlib.h b/src/pdflib/flate/zlib.h index 977a8bd..d10a9f4 100644 --- a/src/pdflib/flate/zlib.h +++ b/src/pdflib/flate/zlib.h @@ -29,7 +29,7 @@ */ -/* $Id: zlib.h,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* $Id: zlib.h,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ #ifndef ZLIB_H #define ZLIB_H diff --git a/src/pdflib/flate/zprefix.h b/src/pdflib/flate/zprefix.h index ddac287..791b1da 100644 --- a/src/pdflib/flate/zprefix.h +++ b/src/pdflib/flate/zprefix.h @@ -1,4 +1,4 @@ -/* $Id: zprefix.h,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* $Id: zprefix.h,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ /* * If you *really* need a unique prefix for all types and library functions, diff --git a/src/pdflib/flate/zutil.c b/src/pdflib/flate/zutil.c index 2fa45b3..b20aaa4 100644 --- a/src/pdflib/flate/zutil.c +++ b/src/pdflib/flate/zutil.c @@ -3,8 +3,8 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ -/* $Id: zutil.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ -/* @(#) $Id: zutil.c,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* $Id: zutil.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ +/* @(#) $Id: zutil.c,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ #include "zutil.h" diff --git a/src/pdflib/flate/zutil.h b/src/pdflib/flate/zutil.h index 0db04c2..ea0fd6c 100644 --- a/src/pdflib/flate/zutil.h +++ b/src/pdflib/flate/zutil.h @@ -9,8 +9,8 @@ */ -/* $Id: zutil.h,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ -/* @(#) $Id: zutil.h,v 1.1 2008/10/17 06:10:42 scuri Exp $ */ +/* $Id: zutil.h,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ +/* @(#) $Id: zutil.h,v 1.2 2009/10/20 18:12:26 scuri Exp $ */ #ifndef ZUTIL_H #define ZUTIL_H @@ -175,6 +175,16 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ # define F_OPEN(name, mode) fopen((name), (mode)) #endif +/* PDFlib GmbH: we need this before redefining vsnprintf (Visuals Studio 2008)*/ +/* Diagnostic functions */ +#ifdef DEBUG +# include <stdio.h> + extern int z_verbose; + extern void z_error OF((char *m)); +# define Assert(cond,msg) {if(!(cond)) z_error(msg);} +#else +# define Assert(cond,msg) +#endif /* functions */ #if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) @@ -239,15 +249,6 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ extern void zmemzero OF((Bytef* dest, uInt len)); #endif -/* Diagnostic functions */ -#ifdef DEBUG -# include <stdio.h> - extern int z_verbose; - extern void z_error OF((char *m)); -# define Assert(cond,msg) {if(!(cond)) z_error(msg);} -#else -# define Assert(cond,msg) -#endif /* PDFlib GmbH: we don't like trace messages from here. */ #if 0 |