giflib-4.1.6-giffix-null-Extension-fix.patch 693 B

12345678910111213141516
  1. diff -ru giflib-4.1.6/util/giffix.c giflib-4.1.6.new/util/giffix.c
  2. --- giflib-4.1.6/util/giffix.c 2005-10-09 23:22:23.000000000 -0700
  3. +++ giflib-4.1.6.new/util/giffix.c 2008-09-04 14:00:41.000000000 -0700
  4. @@ -181,8 +181,8 @@
  5. /* Skip any extension blocks in file: */
  6. if (DGifGetExtension(GifFileIn, &ExtCode, &Extension) == GIF_ERROR)
  7. QuitGifError(GifFileIn, GifFileOut);
  8. - if (EGifPutExtension(GifFileOut, ExtCode, Extension[0],
  9. - Extension) == GIF_ERROR)
  10. + if (Extension && EGifPutExtension(GifFileOut, ExtCode,
  11. + Extension[0], Extension) == GIF_ERROR)
  12. QuitGifError(GifFileIn, GifFileOut);
  13. /* No support to more than one extension blocks, so discard: */