https://bugzilla.novell.com/show_bug.cgi?id=693578
https://bugzilla.novell.com/show_bug.cgi?id=693578#c0
Summary: graphics/ImageMagick: crash in DrawImage when
localized and after SetStrokeColor
Classification: openSUSE
Product: openSUSE.org
Version: unspecified
Platform: x86-64
OS/Version: openSUSE 11.4
Status: NEW
Severity: Major
Priority: P5 - None
Component: 3rd party software
AssignedTo: nadvornik@novell.com
ReportedBy: giecrilj@stegny.2a.pl
QAContact: opensuse-communityscreening@forge.provo.novell.com
CC: pgajdos@novell.com
Found By: Community User
Blocker: Yes
Program received signal SIGSEGV, Segmentation fault.
TraceBezier (primitive_info=0x7ffff4d14840, number_coordinates=<value optimized
out>) at magick/draw.c:5076
I am going to work on this bug myself. Test case follows.
Aside: Please build IM for 11.4 too (I need -debugsource to get the full
backtrace).
/* .NAME wlb \- expose a locale-related bug in MagickWand
* .SH SYNOPSIS
* LANG=pl_PL.utf8 gdb wlb
* .SH BUGS
* The program crashes with segmentation violation when $LANG == pl_PL.utf8
* */
#define TRIGGER_CRASH /* undef to inhibit the crash */
#include
#include
#include
#include
#include
#include
struct stdnames
{ char t_locale [07], t_write [06], t_spawn [05], t_empty [01]; }
const sc_stdnames = { "locale", "write", "spawn" };
static void handle_Magick_error (MagickWand *p_wand)
/* Writes an error message to the standard error */
{
ExceptionType a_sev;
register char *const a_descr = MagickGetException (p_wand, &a_sev);
if (0 > fprintf (stderr, "%s %s %lu %s", GetMagickModule (), a_descr))
{ perror (sc_stdnames. t_write); } MagickRelinquishMemory (a_descr); }
/* !handle_Magick_error X */
int main (int p_arg_count, char const *const p_args [])
/*
* Fills the form with predefined strings.
* The form has four pages and the strings are placed on subsequent pages in
order.
*/
{ register int a_code = +EXIT_FAILURE;
if (setlocale (LC_ALL, "") == NULL) perror (sc_stdnames. t_locale);
MagickWandGenesis ();
{ register MagickWand *const a_wand = NewMagickWand ();
if (MagickReadImage (a_wand, "canvas:white") == MagickTrue) /*
?READ_IMAGE_SUCCEEDED Y */
{
register DrawingWand *const a_draw = NewDrawingWand ();
register PixelWand *const a_px = NewPixelWand (); /* .H2 FORM DATA */
static unsigned char const sc_message [] = "BUG!";
PixelSetHSL (a_px, 0, 0, 0);
#ifdef TRIGGER_CRASH
DrawSetStrokeColor (a_draw, a_px);
#endif
DrawAnnotation (a_draw, 0, 0, sc_message);
if (MagickDrawImage (a_wand, a_draw) != MagickTrue) handle_Magick_error
(a_wand);
DestroyPixelWand (a_px); DestroyDrawingWand (a_draw); }
else /* ?READ_IMAGE_SUCCEEDED N */ handle_Magick_error (a_wand); /*
?READ_IMAGE_SUCCEEDED */
DestroyMagickWand (a_wand);
}
MagickWandTerminus ();
if (fflush (stdout) < 0)
{ perror (sc_stdnames. t_write); return +EXIT_FAILURE; } else return +a_code;
}
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.