From 8e2e234794b392377eb303f2ca5e88a51e6e1f6c Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Mon, 7 Jan 2019 22:59:50 +1100 Subject: [PATCH] don't check if the unsigned size passed to mymalloc is negative. --- Changes | 4 ++++ io.c | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Changes b/Changes index ec1ffd9d..7a77399c 100644 --- a/Changes +++ b/Changes @@ -121,6 +121,10 @@ Lower severity (according to Coverity): - re-work testing for size_t overflow for circle/random super-sampling for fountain fills. CID 185304. + - don't check if the unsigned size passed to Imager's malloc wrapper + (mymalloc) is negative. Left from when that parameter was signed. + CID 185305. + [1] The first two build submissions ended up at the end of a ~400 build queue, and seemed to have been cancelled by Coverity. A build submitted on NYE went through in minutes. diff --git a/io.c b/io.c index 3d8c4534..222553ab 100644 --- a/io.c +++ b/io.c @@ -235,11 +235,6 @@ void* mymalloc(size_t size) { void *buf; - if (size < 0) { - fprintf(stderr, "Attempt to allocate size %ld\n", (long)size); - exit(3); - } - if ( (buf = malloc(size)) == NULL ) { mm_log((1, "mymalloc: unable to malloc %ld\n", (long)size)); fprintf(stderr,"Unable to malloc %ld.\n", (long)size); exit(3); -- 2.39.5