From: Tony Cook <tony@develop-help.com> Date: Mon, 7 Jan 2019 11:59:50 +0000 (+1100) Subject: don't check if the unsigned size passed to mymalloc is negative. X-Git-Tag: v1.009~6 X-Git-Url: http://git.imager.perl.org/imager.git/commitdiff_plain/8e2e234794b392377eb303f2ca5e88a51e6e1f6c don't check if the unsigned size passed to mymalloc is negative. --- 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);