[jbig2-cvs] rev 367 - trunk
giles at ghostscript.com
giles at ghostscript.com
Mon Dec 20 16:35:02 PST 2004
Author: giles
Date: 2004-12-20 16:35:02 -0800 (Mon, 20 Dec 2004)
New Revision: 367
Modified:
trunk/CHANGES
trunk/jbig2_page.c
Log:
Re-assign the return value of jbig2_realloc() when growning the page
size array. Previously it was dropped which could cause crashes on some
systems processing documents with more than 4 pages. Thanks to Jan
Patera for reporting this.
Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES 2004-12-13 20:00:09 UTC (rev 366)
+++ trunk/CHANGES 2004-12-21 00:35:02 UTC (rev 367)
@@ -1,6 +1,6 @@
Version 0.8 (unreleased)
- * no changes as of yet
+ * Fix an allocation error in the page array
Version 0.7 (2004 December 8)
Modified: trunk/jbig2_page.c
===================================================================
--- trunk/jbig2_page.c 2004-12-13 20:00:09 UTC (rev 366)
+++ trunk/jbig2_page.c 2004-12-21 00:35:02 UTC (rev 367)
@@ -85,7 +85,8 @@
index++;
if (index >= ctx->max_page_index) { /* FIXME: should also look for freed pages? */
/* grow the list */
- jbig2_realloc(ctx->allocator, ctx->pages, (ctx->max_page_index <<= 2) * sizeof(Jbig2Page));
+ ctx->pages = jbig2_realloc(ctx->allocator, ctx->pages,
+ (ctx->max_page_index <<= 2) * sizeof(Jbig2Page));
for (j=index; j < ctx->max_page_index; j++) {
/* note to raph: and look, it gets worse! */
ctx->pages[j].state = JBIG2_PAGE_FREE;
More information about the jbig2-cvs
mailing list