png-1.5 fixes

Bug #821210 reported by Thomas Klausner
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Stratagus
Fix Released
Undecided
Pali

Bug Description

In the latest releases, 1.5 and newer, the png library disabled direct
access to its structure members. One is supposed to use the accessor
functions now.
The attached patch (against 2.1, but seems to be still needed looking at the online repository a few minutes ago) fixes the issue.

Related branches

Revision history for this message
Thomas Klausner (tk-giga) wrote :
Revision history for this message
Pali (pali) wrote :

And why is this patch needed?

Revision history for this message
Thomas Klausner (tk-giga) wrote :

As I said, png-1.5 now forbids access to internal struct members.
Compilerwise, without the patch, it looks like this:
src/video/obj/../png.c: In function 'LoadGraphicPNG':
src/video/obj/../png.c:136: error: dereferencing pointer to incomplete type
src/video/obj/../png.c:215: error: dereferencing pointer to incomplete type
src/video/obj/../png.c:219: error: dereferencing pointer to incomplete type
src/video/obj/../png.c:227: error: dereferencing pointer to incomplete type
src/video/obj/../png.c:273: error: dereferencing pointer to incomplete type
src/video/obj/../png.c:274: error: dereferencing pointer to incomplete type
src/video/obj/../png.c:275: error: dereferencing pointer to incomplete type
src/video/obj/../png.c:276: error: dereferencing pointer to incomplete type
src/video/obj/../png.c:277: error: dereferencing pointer to incomplete type
src/video/obj/../png.c:278: error: dereferencing pointer to incomplete type
src/video/obj/../png.c: In function 'SaveScreenshotPNG':
src/video/obj/../png.c:334: error: dereferencing pointer to incomplete type

Revision history for this message
Pali (pali) wrote :
Revision history for this message
Thomas Klausner (tk-giga) wrote :

Yes, this patch will fix the issue reported in https://bugs.launchpad.net/stratagus/+bug/816575
Sorry that I overlooked that bug report.

Revision history for this message
Pali (pali) wrote :

Your patch file was not possible to apply, because it was for old version of stratagus. It was against file png.c, but in stratagus is now png.cpp (and has other structure). So I modified file png.cpp manually.

Chnages is in this commit: http://bazaar.launchpad.net/~stratagus/stratagus/trunk/revision/7993
Check if all png erros is fixed.

Pali (pali)
Changed in stratagus:
assignee: nobody → Pali (pali)
status: New → Fix Committed
milestone: none → 2.2.6
Pali (pali)
Changed in stratagus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.