diff options
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/writepng.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index d6eb35ac852..92dc192dfcb 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,9 @@ +2017-03-29 Akira Kakuto <kakuto@fuk.kindai.ac.jp> + + * writepng.c: Fix the size of memory to allocate when writing + SMask in write_png_rgb_alpha. Reported by David Fifield: + http://tug.org/pipermail/pdftex/2017-March/009100.html. + 2017-03-18 Karl Berry <karl@tug.org> * NEWS, diff --git a/Build/source/texk/web2c/pdftexdir/writepng.c b/Build/source/texk/web2c/pdftexdir/writepng.c index 5713880f6e1..56d398f1c2d 100644 --- a/Build/source/texk/web2c/pdftexdir/writepng.c +++ b/Build/source/texk/web2c/pdftexdir/writepng.c @@ -335,7 +335,7 @@ static void write_png_rgb_alpha(integer img) pdfcreateobj(0, 0); smask_objnum = objptr; pdf_printf("/SMask %i 0 R\n", (int) smask_objnum); - smask_size = (png_get_rowbytes(png_ptr(img), png_info(img)) / 2) + smask_size = (png_get_rowbytes(png_ptr(img), png_info(img)) / 4) * png_get_image_height(png_ptr(img), png_info(img)); smask = xtalloc(smask_size, png_byte); pdfbeginstream(); |