Mailinglist Archive: opensuse-bugs (5243 mails)

< Previous Next >
[Bug 810701] cairo calls png_set_read_user_transform_fn() after png_read_update_info()

https://bugzilla.novell.com/show_bug.cgi?id=810701

https://bugzilla.novell.com/show_bug.cgi?id=810701#c2


--- Comment #2 from Petr Gajdos <pgajdos@xxxxxxxx> 2013-03-21 09:04:37 UTC ---
As they seems not allow emails from cc'ed persons, here are followups from John
and Glenn, libpng authors:

On Wed, Mar 20, 2013 at 6:19 AM, <pgajdos@xxxxxxx> wrote:

On Wed, Mar 20, 2013 at 11:11:24AM +0100, pgajdos@xxxxxxx wrote:
> #2 0x00007ffff7b4d1af in read_png (png_closure=0x7fffffffe7f0) at
> cairo-png.c:651
[...]
> 102 png_app_error(png_ptr,
> 103 "invalid after png_start_read_image or
> png_read_update_info");

Seems that png_set_read_user_transform_fn() needs to be moved before
png_read_update_info() call. Glenn, John, correct?


Correct. The manual has always said that in its description of
png_read_update_info() but it wasn't enforced until 1.6.0.

Also as you noted in another message, the "out of memory" return
is bogus; libpng's error message (above) was discarded.

Glenn


On Wed, Mar 20, 2013 at 3:19 AM, <pgajdos@xxxxxxx> wrote:
Seems that png_set_read_user_transform_fn() needs to be moved before
png_read_update_info() call. Glenn, John, correct?

Yes

There is similar issue in perl-Tk.

Yes. What Cairo is doing is apparently harmless, but it does depend
on whether it calls png_set_user_transform_info too; that must
certainly come before png_read_update_info.

Turning the error into a warning will *not* work in this case, because
even if libpng just does a warning it does not set the callback so
Cairo will, presumably, get messed up images.

We could change 1.6.1 so that it is possible to change the callback on
the fly (as before), but I can't see that this is particularly useful
and it is a significant new support requirement. It would also be the
only one of the png_set_ functions that supports this (in all the
other cases the behavior is undefined.)

John Bowler <jbowler@xxxxxxx>

--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >
References