[webkit-reviews] review denied: [Bug 65420] WebKit2 crashes on attempt to decode null image : [Attachment 102452] Fix crash on attempt to decode null image

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jul 30 23:08:41 PDT 2011


Darin Adler <darin at apple.com> has denied Oleg Romashin (:romaxa)
<romaxa at gmail.com>'s request for review:
Bug 65420: WebKit2 crashes on attempt to decode null image
https://bugs.webkit.org/show_bug.cgi?id=65420

Attachment 102452: Fix crash on attempt to decode null image
https://bugs.webkit.org/attachment.cgi?id=102452&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
This change is incorrect. While this will not crash, it will create an encoded
argument that will not decode properly on the receiving end. The decode
function will decode the cursor type, see that it is Custom, then call
decodeImage. But decodeImage will read the data of the next thing encoded in
the stream, and the decode process will then fail because we’ll be off by at
least one byte.

The correct way to change this is to make the null image encode in a way that
can be decoded on the other end. One way this could be accomplished would be to
encode a boolean to indicate whether an image is present before encoding the
image and then decode that boolean in the cursor decode function. If the
boolean says the image is null the decoder knows not to try to decode the
image. If the boolean says the image is non-null then it knows it must decode
the image.


More information about the webkit-reviews mailing list