Rebuild with latest versions of pango/gtk2.
[fedora-mingw.git] / libpng / libpng-ztxt-bug.patch
1 Patch for CVE-2008-3964
2
3
4 diff -ru4NwbB libpng-1.2.31/pngpread.c libpng-1.2.32beta01/pngpread.c
5 --- libpng-1.2.31/pngpread.c    2008-08-21 05:54:13.254898477 -0500
6 +++ libpng-1.2.32beta01/pngpread.c      2008-09-06 07:03:43.043602194 -0500
7 @@ -1278,9 +1278,9 @@
8  
9                 tmp = text;
10                 text = (png_charp)png_malloc(png_ptr, text_size +
11                    (png_uint_32)(png_ptr->zbuf_size 
12 -                  - png_ptr->zstream.avail_out));
13 +                  - png_ptr->zstream.avail_out + 1));
14                 png_memcpy(text, tmp, text_size);
15                 png_free(png_ptr, tmp);
16                 png_memcpy(text + text_size, png_ptr->zbuf,
17                    png_ptr->zbuf_size - png_ptr->zstream.avail_out);