diff options
Diffstat (limited to 'print/ghostscript8-base/files/patch-base_gsmalloc.c')
-rw-r--r-- | print/ghostscript8-base/files/patch-base_gsmalloc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/print/ghostscript8-base/files/patch-base_gsmalloc.c b/print/ghostscript8-base/files/patch-base_gsmalloc.c new file mode 100644 index 000000000000..4ae8db0c87ab --- /dev/null +++ b/print/ghostscript8-base/files/patch-base_gsmalloc.c @@ -0,0 +1,11 @@ +--- base/gsmalloc.c.orig 2009-08-18 20:41:17 UTC ++++ base/gsmalloc.c +@@ -174,7 +174,7 @@ gs_heap_alloc_bytes(gs_memory_t * mem, u + } else { + uint added = size + sizeof(gs_malloc_block_t); + +- if (mmem->limit - added < mmem->used) ++ if (added <= size || mmem->limit - added < mmem->used) + set_msg("exceeded limit"); + else if ((ptr = (byte *) malloc(added)) == 0) + set_msg("failed"); |