]> git.imager.perl.org - imager.git/commitdiff
don't check if the unsigned size passed to mymalloc is negative.
authorTony Cook <tony@develop-help.com>
Mon, 7 Jan 2019 11:59:50 +0000 (22:59 +1100)
committerTony Cook <tony@develop-help.com>
Mon, 7 Jan 2019 11:59:50 +0000 (22:59 +1100)
Changes
io.c

diff --git a/Changes b/Changes
index ec1ffd9d49c0340eeb42fa7be82487b667762ef6..7a77399ce1c22ae4c4f396157312aed492c073c2 100644 (file)
--- 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 3d8c4534c991f86d6085bf26a038a4a4785e417d..222553abd750df600676794f51207846b12f6d77 100644 (file)
--- 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);