[packages] libpng: fix 1-bit interlaced images information disclosure vulnerability...
[openwrt/svn-archive/archive.git] / libs / libpng / patches / 901-cve-2009-2042.patch
1 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-2042
2
3 --- a/pngrutil.c
4 +++ b/pngrutil.c
5 @@ -3150,6 +3150,8 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED
6 {
7 png_free(png_ptr,png_ptr->big_row_buf);
8 png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr, row_bytes+64);
9 + if (png_ptr->interlaced)
10 + png_memset(png_ptr->big_row_buf, 0, png_ptr->rowbytes + 64);
11 png_ptr->row_buf = png_ptr->big_row_buf+32;
12 png_ptr->old_big_row_buf_size = row_bytes+64;
13 }