[Magick-bugs] Access violation in profile.c
Priya Hariharan
priya.hariharan at globalphotobooks.com
Tue Jun 2 19:01:02 PDT 2009
Hi,
An access violation occurs in the function *ProfileImage* since
*traget_profile* is accessed after it is freed.
Please find a fix to this problem.
Index: ../magick/profile.c
===================================================================
--- ../magick/profile.c (revision 9752)
+++ ../magick/profile.c (working copy)
@@ -1005,7 +1005,6 @@
transform=cmsCreateTransform(source_profile,source_type,
target_profile,target_type,intent,flags);
(void) cmsCloseProfile(source_profile);
- (void) cmsCloseProfile(target_profile);
if (transform == (cmsHTRANSFORM) NULL)
ThrowBinaryException(ImageError,"UnableToCreateColorTransform",
name);
@@ -1103,6 +1102,7 @@
source_pixels=(unsigned short *) RelinquishMagickMemory(
source_pixels);
cmsDeleteTransform(transform);
+ (void) cmsCloseProfile(target_profile);
}
#endif
}
Thanks and Regards,
Priya
--
Thanks and Regards,
Priya
More information about the Magick-bugs
mailing list