Closed Bug 392867 Opened 17 years ago Closed 13 years ago

PNG encoder error handler incorrectly returns to caller

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: glennrp+bmo, Assigned: glennrp+bmo)

References

Details

Attachments

(1 file, 1 obsolete file)

Libpng requires the error handler not to return to the caller.  The png decoder is doing this correctly, but the png decoder returns, which will probably lead to stack corruption and a crash.  It is supposed to perform a longjmp instead.  The attached patch separates the error and warning handlers, and does a longjmp from the error handler.
I meant to say "but the png encoder returns"
The patch is only applicable to the trunk.  The branch uses libpng's default error handler and should be OK as is.
Glenn: are you going to ask for review on the patch?
Yes, but I wanted to give the TryServer a shot first.  Also I would like to generate a test case.
Someone please run this through the try server.
Blocks: 614144
Blocks: 700193
No longer blocks: 614144
Try run for ff7ed4731b86 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=ff7ed4731b86
Results (out of 263 total builds):
    exception: 2
    success: 231
    warnings: 27
    failure: 3
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/jdrew@mozilla.com-ff7ed4731b86
Comment on attachment 568841 [details] [diff] [review]
v01: separate Warning and Error Callbacks, updated directory to "image"

None of the failures appear to be related to this patch.
Attachment #568841 - Flags: review?(joe)
Attachment #568841 - Flags: review?(joe) → review+
http://hg.mozilla.org/mozilla-central/rev/11eb2aecc7c3
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Try run for ff7ed4731b86 is complete.
Detailed breakdown of the results available here:
    https://tbpl.mozilla.org/?tree=Try&rev=ff7ed4731b86
Results (out of 272 total builds):
    exception: 2
    success: 231
    warnings: 27
    failure: 11
    other: 1
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/jdrew@mozilla.com-ff7ed4731b86
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: