Panic in jpeg format loading cnn.com in Servo #8
Comments
Wow, thanks! I'll investigate it ASAP. Is there a direct link to the offending image? |
Not yet; sorry. |
The image appears to be |
The jpeg loader was only tried because the webp one didn't return an Ok value, apparently. |
|
@jdm Thanks! Indeed this could happen, webp support is not full yet. Apparently it has |
Perhaps make webp support a feature that can be enabled by users of the library? It would still be useful to harden the jpeg decoder to avoid this, too. |
This somehow didn't even occur to me. Indeed, that would be a nice solution, thanks!
Yes, I agree. Unfortunately, JPEG is such a loose format that it is pretty hard to do it... I'll see what I can do. |
Apparently I was wrong about the looseness of the JPEG format. I finally have found its specification, and I was able to improve the JPEG parser considerably. It does not contain the overflow problem anymore, and it also provides more pieces of metadata. See version 0.3.4. immeta will now return "unsupported image format" error for the image in question. @jdm please tell if this is an acceptable behavior. |
Perfect! |
Okay, then I'll close this. Thanks! |
This is
immeta/src/formats/jpeg.rs
Line 37 in f06b1fd
The text was updated successfully, but these errors were encountered: