gecko/modules/libpr0n/decoders/gif
Joe Drew ec0ef86e27 Bug 505474 - Restore tracking of whether we've finished decoding a given GIF frame, so we don't call EndImageFrame() twice for a single frame. r=vlad
Before bug 753 landed, we implicitly tracked whether we'd called
EndImageFrame() by setting mImageFrame to null inside EndImageFrame(). Once
we stopped doing that, we tried writing to memory that had already been freed.

(This memory is actually freed once we error out on the invalid GIF, but the
internal state-tracking mechanics made it so we never wrote to that memory
even though we have stale pointers to it. Unfortunately when we entered
EndImageFrame() a second time, that state tracking was invalid and we
attempted to write to the stale pointer.)

This patch introduces a tracking variable, mCurrentFrame, which is set to the
frame of the currently-decoding frame when we're in the middle of decoding
it, and -1 otherwise. This ensures we don't enter EndImageFrame() a second
time, restoring the functionality we had prior to bug 753.
2009-07-21 21:20:01 -07:00
..
GIF2.h bug 143046. Keep GIFs at original 8bit. patch from Alfred Kayser <alfredkayser@nl.ibm.com>. r=me sr=tor 2007-11-07 13:33:57 -08:00
Makefile.in Bug 481926 - Rewrite color management component sr=vlad, r=ted, r=joedrew (\o/) 2009-04-07 12:02:11 -04:00
nsGIFDecoder2.cpp Bug 505474 - Restore tracking of whether we've finished decoding a given GIF frame, so we don't call EndImageFrame() twice for a single frame. r=vlad 2009-07-21 21:20:01 -07:00
nsGIFDecoder2.h Bug 505474 - Restore tracking of whether we've finished decoding a given GIF frame, so we don't call EndImageFrame() twice for a single frame. r=vlad 2009-07-21 21:20:01 -07:00