Menu

#191 Fix integer overflows, out-of-bounds access, and uninitialized memory

v1.0_(example)
wont-fix
nobody
patch (1)
1
2026-04-11
2026-03-12
No

This patch fixes 7 memory safety issues across giflib:

  1. gifalloc.c (GifUnionColorMap): Heap OOB read/write - CrntSlot guard + off-by-one fix
  2. gifalloc.c (GifApplyTranslation): Integer overflow in Width*Height
  3. gifalloc.c (GifMakeSavedImage): Integer overflow in raster allocation → heap buffer overflow
  4. gifalloc.c (GifAddExtensionBlock): Uninitialized heap memory disclosure
  5. egif_lib.c + dgif_lib.c: Signed integer overflow in PixelCount on 32-bit
  6. egif_lib.c (EGifSpew): Signed overflow in row pointer arithmetic
  7. quantize.c (GifQuantizeBuffer): Stack buffer overflow + Width*Height overflow
1 Attachments

Discussion

  • Ildar Mulyukov

    Ildar Mulyukov - 2026-03-22

    the patch is very strange. Could you please clarify how is it supposed to be applied?

    Note: it patches files like vp8/encoder/onyx_if.c

     
  • Eric S. Raymond

    Eric S. Raymond - 2026-04-11
     
  • Eric S. Raymond

    Eric S. Raymond - 2026-04-11

    This is not a patch for giflib. Can't apply, rejected.

     
  • Eric S. Raymond

    Eric S. Raymond - 2026-04-11
    • status: open --> wont-fix
     

Log in to post a comment.

MongoDB Logo MongoDB