Bug 40907 - [PNG decoder] direct access to jmpbuf is deprecated in libpng >= 1.4.0beta103
Summary: [PNG decoder] direct access to jmpbuf is deprecated in libpng >= 1.4.0beta103
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-21 02:44 PDT by Philippe Normand
Modified: 2012-04-29 19:24 PDT (History)
2 users (show)

See Also:


Attachments
proposed patch (3.45 KB, patch)
2010-06-21 03:10 PDT, Philippe Normand
xan.lopez: review+
commit-queue: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2010-06-21 02:44:10 PDT
Extract from libpng/CHANGES:


 Make the 'png_jmpbuf' macro expand to a call that records the correct
    longjmp function as well as returning a pointer to the setjmp
    jmp_buf buffer, and marked direct access to jmpbuf 'deprecated'.
    (John Bowler)

So the PNGImageDecoder should use png_jmpbuf(m_png) instead of m_png->jmpbuf if libpng >= 1.4 is used.
Comment 1 Philippe Normand 2010-06-21 03:10:46 PDT
Created attachment 59237 [details]
proposed patch
Comment 2 Xan Lopez 2010-06-29 05:30:09 PDT
Comment on attachment 59237 [details]
proposed patch

Looks good to me.
Comment 3 WebKit Commit Bot 2010-06-29 06:39:35 PDT
Comment on attachment 59237 [details]
proposed patch

Rejecting patch 59237 from commit-queue.

Failed to run "[u'/Users/eseidel/Projects/CommitQueue/WebKitTools/Scripts/svn-apply', u'--reviewer', u'Xan Lopez', u'--force']" exit_code: 1
Parsed 2 diffs from patch file(s).
patching file WebCore/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
Hunk #3 FAILED at 131.
Hunk #4 FAILED at 219.
Hunk #5 succeeded at 303 (offset 14 lines).
2 out of 5 hunks FAILED -- saving rejects to file WebCore/platform/image-decoders/png/PNGImageDecoder.cpp.rej
patch unexpectedly ends in middle of line

Full output: http://webkit-commit-queue.appspot.com/results/3339000
Comment 4 Philippe Normand 2010-06-29 06:59:22 PDT
Manually landed a rebased patch as http://trac.webkit.org/changeset/62114
Sorry for the noise Eric
Comment 5 noel gordon 2012-04-29 19:24:53 PDT
Question: would the following work for you?

#ifndef png_jmpbuf
#define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
#endif