From: Ilia Alshanetsky Date: Thu, 16 Jan 2003 21:18:49 +0000 (+0000) Subject: Fixed bug #21651 (crash in pdf_open_memory_image() when inserting a X-Git-Tag: PHP_5_0_dev_before_13561_fix~182 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=41092dbd8afad4bf913922923c0abaa45fb29ded;p=php Fixed bug #21651 (crash in pdf_open_memory_image() when inserting a non truecolor image). --- diff --git a/ext/pdf/pdf.c b/ext/pdf/pdf.c index ceb63407cf..569bd49a4e 100644 --- a/ext/pdf/pdf.c +++ b/ext/pdf/pdf.c @@ -1979,7 +1979,7 @@ PHP_FUNCTION(pdf_open_memory_image) } else { #endif if (im->pixels && gdImageBoundsSafe(im, j, i)) { - color = im->pixels[im->sy][im->sx]; + color = im->pixels[i][j]; *ptr++ = im->red[color]; *ptr++ = im->green[color]; *ptr++ = im->blue[color];