|
|
@@ -1,5 +1,61 @@
|
|
|
---- src/3rdparty/libpng/pngrtran.c.orig Wed Oct 2 20:20:24 2002
|
|
|
-+++ src/3rdparty/libpng/pngrtran.c Wed Jan 15 11:30:23 2003
|
|
|
+Index: src/3rdparty/libpng/pngconf.h
|
|
|
+--- src/3rdparty/libpng/pngconf.h.orig 2003-05-13 09:08:31 +0200
|
|
|
++++ src/3rdparty/libpng/pngconf.h 2004-07-02 09:03:26 +0200
|
|
|
+@@ -251,10 +251,6 @@
|
|
|
+ # define PNG_SAVE_BSD_SOURCE
|
|
|
+ # undef _BSD_SOURCE
|
|
|
+ # endif
|
|
|
+-# ifdef _SETJMP_H
|
|
|
+- __png.h__ already includes setjmp.h;
|
|
|
+- __dont__ include it again.;
|
|
|
+-# endif
|
|
|
+ # endif /* __linux__ */
|
|
|
+
|
|
|
+ /* include setjmp.h for error handling */
|
|
|
+Index: src/3rdparty/libpng/pngerror.c
|
|
|
+--- src/3rdparty/libpng/pngerror.c.orig 2003-05-13 09:08:31 +0200
|
|
|
++++ src/3rdparty/libpng/pngerror.c 2004-07-02 09:03:26 +0200
|
|
|
+@@ -135,10 +135,13 @@
|
|
|
+ buffer[iout] = 0;
|
|
|
+ else
|
|
|
+ {
|
|
|
++ png_size_t len;
|
|
|
++ if ((len = png_strlen(error_message)) > 63)
|
|
|
++ len = 63;
|
|
|
+ buffer[iout++] = ':';
|
|
|
+ buffer[iout++] = ' ';
|
|
|
+- png_memcpy(buffer+iout, error_message, 64);
|
|
|
+- buffer[iout+63] = 0;
|
|
|
++ png_memcpy(buffer+iout, error_message, len);
|
|
|
++ buffer[iout+len] = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+Index: src/3rdparty/libpng/pngrtran.c
|
|
|
+--- src/3rdparty/libpng/pngrtran.c.orig 2003-05-13 09:08:31 +0200
|
|
|
++++ src/3rdparty/libpng/pngrtran.c 2004-07-02 09:03:26 +0200
|
|
|
+@@ -1889,8 +1889,8 @@
|
|
|
+ /* This changes the data from GG to GGXX */
|
|
|
+ if (flags & PNG_FLAG_FILLER_AFTER)
|
|
|
+ {
|
|
|
+- png_bytep sp = row + (png_size_t)row_width;
|
|
|
+- png_bytep dp = sp + (png_size_t)row_width;
|
|
|
++ png_bytep sp = row + (png_size_t)row_width * 2;
|
|
|
++ png_bytep dp = sp + (png_size_t)row_width * 2;
|
|
|
+ for (i = 1; i < row_width; i++)
|
|
|
+ {
|
|
|
+ *(--dp) = hi_filler;
|
|
|
+@@ -1907,8 +1907,8 @@
|
|
|
+ /* This changes the data from GG to XXGG */
|
|
|
+ else
|
|
|
+ {
|
|
|
+- png_bytep sp = row + (png_size_t)row_width;
|
|
|
+- png_bytep dp = sp + (png_size_t)row_width;
|
|
|
++ png_bytep sp = row + (png_size_t)row_width * 2;
|
|
|
++ png_bytep dp = sp + (png_size_t)row_width * 2;
|
|
|
+ for (i = 0; i < row_width; i++)
|
|
|
+ {
|
|
|
+ *(--dp) = *(--sp);
|
|
|
@@ -1965,8 +1965,8 @@
|
|
|
/* This changes the data from RRGGBB to RRGGBBXX */
|
|
|
if (flags & PNG_FLAG_FILLER_AFTER)
|
|
|
@@ -22,26 +78,3 @@
|
|
|
for (i = 0; i < row_width; i++)
|
|
|
{
|
|
|
*(--dp) = *(--sp);
|
|
|
-
|
|
|
-Steve G <linux_4ever@yahoo.com>
|
|
|
-Libpng accesses memory that is out of bounds when creating an error message
|
|
|
-
|
|
|
-Index: pngerror.c
|
|
|
---- src/3rdparty/libpng/pngerror.c.orig 2002-10-03 13:32:27.000000000 +0200
|
|
|
-+++ src/3rdparty/libpng/pngerror.c 2004-04-28 13:24:22.000000000 +0200
|
|
|
-@@ -135,10 +135,13 @@
|
|
|
- buffer[iout] = 0;
|
|
|
- else
|
|
|
- {
|
|
|
-+ png_size_t len;
|
|
|
-+ if ((len = png_strlen(error_message)) > 63)
|
|
|
-+ len = 63;
|
|
|
- buffer[iout++] = ':';
|
|
|
- buffer[iout++] = ' ';
|
|
|
-- png_memcpy(buffer+iout, error_message, 64);
|
|
|
-- buffer[iout+63] = 0;
|
|
|
-+ png_memcpy(buffer+iout, error_message, len);
|
|
|
-+ buffer[iout+len] = 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|