commit 8abe475b7dde75961ea46b9cb69aa7d658d002f3 Author: Eric S. Raymond Date: Wed Jun 10 17:00:29 2026 -0400 Resolve ticket #203: GifUnionColorMap NULL Pointer Dereference diff --git gifalloc.c gifalloc.c index 886907d..e36684b 100644 --- gifalloc.c +++ gifalloc.c @@ -114,6 +114,10 @@ ColorMapObject *GifUnionColorMap(const ColorMapObject *ColorIn1, int i, j, CrntSlot, RoundUpTo, NewGifBitSize; ColorMapObject *ColorUnion; + if (ColorIn1 == NULL || ColorIn2 == NULL) { + return (NULL); + } + /* * We don't worry about duplicates within either color map; if * the caller wants to resolve those, he can perform unions