The file names in the upstream patch below were modified to apply to GNU ghostscript. From 0c0b0859ae1aba64861599f0e7f74f143f305932 Mon Sep 17 00:00:00 2001 From: Chris Liddell Date: Tue, 7 Jul 2015 16:57:41 +0100 Subject: [PATCH] Bug 696041: sanity check for memory allocation. In gs_heap_alloc_bytes(), add a sanity check to ensure we don't overflow the variable holding the actual number of bytes we allocate. No cluster differences --- gs/base/gsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/gsmalloc.c b/base/gsmalloc.c index 624552d..cad79c2 100644 --- a/base/gsmalloc.c +++ b/base/gsmalloc.c @@ -178,7 +178,7 @@ gs_heap_alloc_bytes(gs_memory_t * mem, uint size, client_name_t cname) } 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 *) Memento_label(malloc(added), cname)) == 0) set_msg("failed"); -- 2.4.6 d5c068fb7c4fa69d4673174254742eb410'>refslogtreecommitdiff
path: root/tests/services.scm
AgeCommit message (Expand)Author
2022-05-18services: Make <service-type> 'description' field mandatory....* gnu/services.scm (<service-type>)[description]: Remove default value. * tests/services.scm: Add 'description' field to each 'service-type' form. Ludovic Courtès
2022-04-10services: Test 'shepherd-service-upgrade' with transient services....This is a followup to eeb8ac43c8c0b0cc69422766070dbefc55f5c5c1. * tests/services.scm ("shepherd-service-upgrade: transient service"): New test. Ludovic Courtès
2022-04-10services: herd: Adjust to <live-service> changes....This is a followup to a2c759c8304c461d096ab763568e7f71546ff4e8. * guix/scripts/system/reconfigure.scm (running-services): Fill in the 'transient?' field of <live-service>. * tests/services.scm ("shepherd-service-upgrade: one unchanged, one upgraded, one new") ("shepherd-service-upgrade: service depended on is not unloaded") ("shepherd-service-upgrade: obsolete services that depend on each other"): Adjust calls to 'live-service'. Ludovic Courtès