From e990ae4f94b04fc8bbf2c2c0529a02c1065d7e4f Mon Sep 17 00:00:00 2001 From: cristy Date: Wed, 26 Jan 2011 01:14:05 +0000 Subject: [PATCH] --- PerlMagick/Changelog | 4 ++++ PerlMagick/Magick.xs | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/PerlMagick/Changelog b/PerlMagick/Changelog index 66111304f..6ea8371c6 100644 --- a/PerlMagick/Changelog +++ b/PerlMagick/Changelog @@ -1,3 +1,7 @@ +2011-01-25 6.6.7-3 Cristy + * Verify color parameter is a Perl array to avoid seg fault (reference + http://www.imagemagick.org/discourse-server/viewtopic.php?f=7&t=17928). + 2010-11-11 6.6.5-6 Cristy * Check that image exists before accessing its member (reference http://www.imagemagick.org/discourse-server/viewtopic.php?f=2&t=17502). diff --git a/PerlMagick/Magick.xs b/PerlMagick/Magick.xs index 6f64e50f1..d8cfef0a3 100644 --- a/PerlMagick/Magick.xs +++ b/PerlMagick/Magick.xs @@ -13251,7 +13251,8 @@ SetPixel(ref,...) } (void) SetImageStorageClass(image,DirectClass); q=GetAuthenticPixels(image,region.x,region.y,1,1,exception); - if ((q == (PixelPacket *) NULL) || (av == (AV *) NULL)) + if ((q == (PixelPacket *) NULL) || (av == (AV *) NULL) || + (SvTYPE(av) != SVt_PVAV)) PUSHs(&sv_undef); else { -- 2.40.0