<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>15142</bug_id>
          
          <creation_ts>2007-09-04 12:01:26 -0700</creation_ts>
          <short_desc>GIFImageDecoder can lie about frame count</short_desc>
          <delta_ts>2007-10-14 04:36:59 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Images</component>
          <version>523.x (Safari 3)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Peter Kasting">pkasting</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>934</commentid>
    <comment_count>0</comment_count>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2007-09-04 12:01:26 -0700</bug_when>
    <thetext>WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp (not used by Safari, but used by Cairo/QT) has an API safety issue in frameBufferAtIndex(): it assumes the frame count has already been decoded, so it just returns the size of the internal frame buffer.  But if a caller calls this function when the decoder has received more data since its last decode (or since ever, if nothing has forced the decoder to start decoding), this value is out of date.

The fix is easy: just call the existing frameCount() function which determines if the count is up to date and recalculates it if not.

Patch coming shortly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>935</commentid>
    <comment_count>1</comment_count>
      <attachid>16199</attachid>
    <who name="Peter Kasting">pkasting</who>
    <bug_when>2007-09-04 12:06:49 -0700</bug_when>
    <thetext>Created attachment 16199
patch v1

Simple fix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57387</commentid>
    <comment_count>2</comment_count>
      <attachid>16199</attachid>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2007-09-29 18:12:34 -0700</bug_when>
    <thetext>Comment on attachment 16199
patch v1

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57999</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2007-10-07 01:38:59 -0700</bug_when>
    <thetext>Is this for feature-branch or trunk?  I don&apos;t know where qt development is going on these days.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58483</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Rowe (bdash)">mrowe</who>
    <bug_when>2007-10-14 04:36:59 -0700</bug_when>
    <thetext>Landed in r26579.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>16199</attachid>
            <date>2007-09-04 12:06:49 -0700</date>
            <delta_ts>2007-09-29 18:12:34 -0700</delta_ts>
            <desc>patch v1</desc>
            <filename>patch</filename>
            <type>text/plain</type>
            <size>1279</size>
            <attacher name="Peter Kasting">pkasting</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiAyNTM1NCkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTQgQEAKKzIwMDctMDktMDQgIFBldGVyIEthc3RpbmcgIDx6ZXJvZHB4QGdtYWls
LmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT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XJBdEluZGV4
KHNpemVfdCBpbmRleCkKIHsKLSAgICBpZiAoaW5kZXggPCAwIHx8IGluZGV4ID49IG1fZnJhbWVC
dWZmZXJDYWNoZS5zaXplKCkpCisgICAgaWYgKGluZGV4IDwgMCB8fCBpbmRleCA+PSBmcmFtZUNv
dW50KCkpCiAgICAgICAgIHJldHVybiAwOwogCiAgICAgUkdCQTMyQnVmZmVyJiBmcmFtZSA9IG1f
ZnJhbWVCdWZmZXJDYWNoZVtpbmRleF07Cg==
</data>
<flag name="review"
          id="6808"
          type_id="1"
          status="+"
          setter="mjs"
    />
          </attachment>
      

    </bug>

</bugzilla>