- 8.71 (bug #565935).

This commit is contained in:
Tim Waugh 2010-02-17 12:37:18 +00:00
parent 117c32f095
commit b96cc94f6f
5 changed files with 21 additions and 82 deletions

View File

@ -25,3 +25,4 @@ ghostscript-8.62.tar.bz2
ghostscript-8.63.tar.bz2
ghostscript-8.64.tar.bz2
ghostscript-8.70.tar.xz
ghostscript-8.71.tar.xz

View File

@ -1,20 +1,6 @@
diff -up ghostscript-8.70/jbig2dec/jbig2_generic.c.jbig2dec-nullderef ghostscript-8.70/jbig2dec/jbig2_generic.c
--- ghostscript-8.70/jbig2dec/jbig2_generic.c.jbig2dec-nullderef 2009-05-29 07:48:44.000000000 +0100
+++ ghostscript-8.70/jbig2dec/jbig2_generic.c 2009-08-03 17:51:13.864875636 +0100
@@ -596,6 +596,10 @@ jbig2_immediate_generic_region(Jbig2Ctx
memcpy (params.gbat, gbat, gbat_bytes);
image = jbig2_image_new(ctx, rsi.width, rsi.height);
+ if (image == NULL)
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
+ "failed to allocate buffer for image");
+
jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
"allocated %d x %d image buffer for region decode results",
rsi.width, rsi.height);
diff -up ghostscript-8.70/jbig2dec/jbig2_symbol_dict.c.jbig2dec-nullderef ghostscript-8.70/jbig2dec/jbig2_symbol_dict.c
--- ghostscript-8.70/jbig2dec/jbig2_symbol_dict.c.jbig2dec-nullderef 2009-05-29 07:48:44.000000000 +0100
+++ ghostscript-8.70/jbig2dec/jbig2_symbol_dict.c 2009-08-03 17:52:35.318750131 +0100
diff -up ghostscript-8.71/jbig2dec/jbig2_symbol_dict.c.jbig2dec-nullderef ghostscript-8.71/jbig2dec/jbig2_symbol_dict.c
--- ghostscript-8.71/jbig2dec/jbig2_symbol_dict.c.jbig2dec-nullderef 2009-05-29 07:48:44.000000000 +0100
+++ ghostscript-8.71/jbig2dec/jbig2_symbol_dict.c 2010-02-17 12:06:42.040614797 +0000
@@ -367,6 +367,11 @@ jbig2_decode_symbol_dict(Jbig2Ctx *ctx,
memcpy(region_params.gbat, params->sdat, sdat_bytes);
@ -56,26 +42,3 @@ diff -up ghostscript-8.70/jbig2dec/jbig2_symbol_dict.c.jbig2dec-nullderef ghosts
jbig2_image_compose(ctx, glyph, image,
-x, 0, JBIG2_COMPOSE_REPLACE);
x += SDNEWSYMWIDTHS[j];
diff -up ghostscript-8.70/jbig2dec/jbig2_text.c.jbig2dec-nullderef ghostscript-8.70/jbig2dec/jbig2_text.c
--- ghostscript-8.70/jbig2dec/jbig2_text.c.jbig2dec-nullderef 2009-05-29 07:48:44.000000000 +0100
+++ ghostscript-8.70/jbig2dec/jbig2_text.c 2009-08-03 17:53:05.166750610 +0100
@@ -312,6 +312,9 @@ jbig2_decode_text_region(Jbig2Ctx *ctx,
IBO = IB;
refimage = jbig2_image_new(ctx, IBO->width + RDW,
IBO->height + RDH);
+ if (image == NULL)
+ return jbig2_error(ctx, JBIG2_SEVERITY_FATAL, segment->number,
+ "could not allocate image storage");
/* Table 12 */
rparams.GRTEMPLATE = params->SBRTEMPLATE;
@@ -676,6 +679,9 @@ jbig2_parse_text_region(Jbig2Ctx *ctx, J
}
image = jbig2_image_new(ctx, region_info.width, region_info.height);
+ if (image == NULL)
+ return jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number,
+ "unable to allocate image storage");
ws = jbig2_word_stream_buf_new(ctx, segment_data + offset, segment->data_length - offset);
if (!params.SBHUFF) {

View File

@ -1,35 +1,7 @@
diff -up ghostscript-8.70/base/gsmisc.c.vsnprintf ghostscript-8.70/base/gsmisc.c
--- ghostscript-8.70/base/gsmisc.c.vsnprintf 2008-01-07 18:43:02.000000000 +0000
+++ ghostscript-8.70/base/gsmisc.c 2009-11-24 17:16:38.575250571 +0000
@@ -69,10 +69,10 @@ int outprintf(const gs_memory_t *mem, co
va_start(args, fmt);
- count = vsprintf(buf, fmt, args);
+ count = vsnprintf(buf, sizeof (buf), fmt, args);
outwrite(mem, buf, count);
- if (count >= PRINTF_BUF_LENGTH) {
- count = sprintf(buf,
+ if (count == -1 || count >= sizeof (buf)) {
+ count = snprintf(buf, sizeof (buf),
"PANIC: printf exceeded %d bytes. Stack has been corrupted.\n",
PRINTF_BUF_LENGTH);
outwrite(mem, buf, count);
@@ -89,10 +89,10 @@ int errprintf(const char *fmt, ...)
va_start(args, fmt);
- count = vsprintf(buf, fmt, args);
+ count = vsnprintf(buf, sizeof (buf), fmt, args);
errwrite(buf, count);
- if (count >= PRINTF_BUF_LENGTH) {
- count = sprintf(buf,
+ if (count == -1 || count >= sizeof (buf)) {
+ count = snprintf(buf, sizeof (buf),
"PANIC: printf exceeded %d bytes. Stack has been corrupted.\n",
PRINTF_BUF_LENGTH);
errwrite(buf, count);
@@ -236,7 +236,7 @@ int gs_throw_imp(const char *func, const
diff -up ghostscript-8.71/base/gsmisc.c.vsnprintf ghostscript-8.71/base/gsmisc.c
--- ghostscript-8.71/base/gsmisc.c.vsnprintf 2010-01-05 00:52:07.000000000 +0000
+++ ghostscript-8.71/base/gsmisc.c 2010-02-17 11:30:13.777615156 +0000
@@ -235,7 +235,7 @@ int gs_throw_imp(const char *func, const
va_list ap;
va_start(ap, fmt);
@ -38,9 +10,9 @@ diff -up ghostscript-8.70/base/gsmisc.c.vsnprintf ghostscript-8.70/base/gsmisc.c
msg[sizeof(msg) - 1] = 0;
va_end(ap);
diff -up ghostscript-8.70/base/gxttfb.c.vsnprintf ghostscript-8.70/base/gxttfb.c
--- ghostscript-8.70/base/gxttfb.c.vsnprintf 2009-07-09 06:59:44.000000000 +0100
+++ ghostscript-8.70/base/gxttfb.c 2009-11-24 17:16:38.577250996 +0000
diff -up ghostscript-8.71/base/gxttfb.c.vsnprintf ghostscript-8.71/base/gxttfb.c
--- ghostscript-8.71/base/gxttfb.c.vsnprintf 2009-12-06 19:12:08.000000000 +0000
+++ ghostscript-8.71/base/gxttfb.c 2010-02-17 11:30:13.778616076 +0000
@@ -246,7 +246,7 @@ static int DebugPrint(ttfFont *ttf, cons
if (gs_debug_c('Y')) {
@ -50,9 +22,9 @@ diff -up ghostscript-8.70/base/gxttfb.c.vsnprintf ghostscript-8.70/base/gxttfb.c
/* NB: moved debug output from stdout to stderr
*/
errwrite(buf, count);
diff -up ghostscript-8.70/base/rinkj/rinkj-byte-stream.c.vsnprintf ghostscript-8.70/base/rinkj/rinkj-byte-stream.c
--- ghostscript-8.70/base/rinkj/rinkj-byte-stream.c.vsnprintf 2008-04-04 02:02:16.000000000 +0100
+++ ghostscript-8.70/base/rinkj/rinkj-byte-stream.c 2009-11-24 17:16:38.577250996 +0000
diff -up ghostscript-8.71/base/rinkj/rinkj-byte-stream.c.vsnprintf ghostscript-8.71/base/rinkj/rinkj-byte-stream.c
--- ghostscript-8.71/base/rinkj/rinkj-byte-stream.c.vsnprintf 2008-04-04 02:02:16.000000000 +0100
+++ ghostscript-8.71/base/rinkj/rinkj-byte-stream.c 2010-02-17 11:30:13.791615392 +0000
@@ -43,7 +43,7 @@ rinkj_byte_stream_printf (RinkjByteStrea
va_list ap;

View File

@ -1,11 +1,11 @@
%define gs_ver 8.70
%define gs_dot_ver 8.70
%define gs_ver 8.71
%define gs_dot_ver 8.71
%{expand: %%define build_with_freetype %{?_with_freetype:1}%{!?_with_freetype:0}}
Summary: A PostScript interpreter and renderer.
Name: ghostscript
Version: %{gs_ver}
Release: 7%{?dist}
Release: 1%{?dist}
# Included CMap data is Redistributable, no modification permitted,
# see http://bugzilla.redhat.com/487510
@ -321,6 +321,9 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libgs.so
%changelog
* Wed Feb 17 2010 Tim Waugh <twaugh@redhat.com> 8.71-1
- 8.71 (bug #565935).
* Tue Feb 16 2010 Tim Waugh <twaugh@redhat.com> 8.70-7
- Reverted gdevcups duplex changes as they cause a regression
(see bug #563313).

View File

@ -1,3 +1,3 @@
2fbae60417d42779f6488ab897dcaaf6 acro5-cmaps-2001.tar.gz
dfc93dd2aaaf2b86d2fd55f654c13261 adobe-cmaps-200406.tar.gz
fec96a1fb44b73a01ba1adda55744784 ghostscript-8.70.tar.xz
5005d68f7395c2bfc4b05c1a60d9b6ba ghostscript-8.71.tar.xz