Menu

#32 Fix of spoilt image counter

Unstable_(example)
closed
nobody
None
1
2024-02-18
2023-09-29
Kobrin Eli
No

Hi! I've found an error in gif library. The problem is with the ImageCount counter of read images. In functionDGifSlurp when we call the DGetImageDesc function in case it returns OK, the image counter is increased. Later, if the sizes of image are incorrect, the error will be returned, RasterBits buffer won't be allocated, but image counter will stay the same. That may lead to delusion that the image was actually read, and as a result to null pointer dereference (see https://github.com/tensorflow/tensorflow/pull/61913).

To prevent this, I've added the decreasing of image counter in error case with corresponding freeing of spoilt image.

1 Attachments

Discussion

  • Kobrin Eli

    Kobrin Eli - 2023-10-03

    Here is the fixed patch

     
  • Kobrin Eli

    Kobrin Eli - 2023-10-04

    Better use this

     
  • Eric S. Raymond

    Eric S. Raymond - 2024-02-18

    Applied, thanks.

     
  • Eric S. Raymond

    Eric S. Raymond - 2024-02-18
    • status: open --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.