Skip to content

Commit

Permalink
Fix #815, gd_topal, explicit null dereferenced (kind of false positiv… (
Browse files Browse the repository at this point in the history
#816)

* Fix #815, gd_topal, explicit null dereferenced (kind of false positive however it does hurt to add that check)

* Fix #815, != NULL
  • Loading branch information
pierrejoye committed Jan 31, 2022
1 parent bdd6919 commit 077d8e7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gd_topal.c
Expand Up @@ -1703,6 +1703,9 @@ static int gdImageTrueColorToPaletteBody (gdImagePtr oim, int dither, int colors
select_colors (oim, nim, cquantize, colorsWanted);
zeroHistogram (cquantize->histogram);
if (dither) {
if (cquantize->error_limiter == NULL) {
goto outOfMemory;
}
pass2_fs_dither (oim, nim, cquantize);
} else {
pass2_no_dither (oim, nim, cquantize);
Expand Down

0 comments on commit 077d8e7

Please sign in to comment.