Commits

Anonymous committed eeb94db

- sync to 2.0.29

  • Participants
  • Parent commits 5ac1549

Comments (0)

Files changed (1)

File src/gd_topal.c

   boxlist = (boxptr) (*cinfo->mem->alloc_small)
     ((j_common_ptr) cinfo, JPOOL_IMAGE, desired_colors * SIZEOF (box));
 #else
+  /* This can't happen because we clamp desired_colors at gdMaxColors, 
+    but anyway */
+  if (overflow2(desired_colors, sizeof (box))) {
+    return;
+   }
   boxlist = (boxptr) gdMalloc (desired_colors * sizeof (box));
 #endif
   /* Initialize one box containing whole space */