Skip to content

#include <png.h>#14

Open
raicho wants to merge 13 commits into
cmakefrom
master
Open

#include <png.h>#14
raicho wants to merge 13 commits into
cmakefrom
master

Conversation

@raicho

@raicho raicho commented Apr 11, 2020

Copy link
Copy Markdown

Hello. Today i try to install this program on fedora 31 but i get msg
: xcf2png.c:22:10: fatal error: png.h: No such file or directory
Have nice day.

Found solution....

yum -y install libpng*

Thank you!

dimumurray and others added 13 commits January 24, 2015 15:56
Replaced deprecated typecasted definitions with 'NULL'.
Updated xcf2png.c. Thanks dimumurray.
Apparently, versions 4-6 are developmental versions where the enum values
don't match the current ones, but those should be very rarely encountered.
 - This introduces a typedef xcfptr_t intended to store pointers in the
   XCF file. It is defined to be a uintptr_t, so it cannot handle true
   64-bit pointers on 32-bit platforms, but since they can't map or fully
   read XCF files larger than 4 GB anyway, that should be an issue.

 - It also introduces xcfP to fetch a pointer from a certain XCF offset,
   and xcfPsz to determine the size of a pointer in the currently loaded
   XCF file. Both of these require global access to the xcfImage struct,
   but that shouldn't be an issue as far as I understand it.

 - Extend accepted versions with 7-12. 4-6 are ignored because of the
   precision value mismatches mentioned in f224a84. 13 and above may very
   well be supported since they only seem to introduce new properties, but
   I have not tested this.

Note that there are quite a few things I have not been able to test,
including compiling and running on big-endian and 32-bit machines, and also
XCF files that are actually larger than 4 GB. I'm also not sure if I've
managed to catch all cases where an xcfptr_t should be used, but ir seems
to work as far as I can see.
I don't know what the point was of making truncated.xcf use version 345,
but these days that triggers reading a precision value from the header,
rendering the test invalid, so make it version 3 instead.
Fix for CVE-2019-5086 and CVE-2019-5087

The code checks the sizes of width and height and stop execution, if it exceeds
maximal values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants