AnnotateImage() should not treat empty text primitive as an error
authorBob Friesenhahn <bfriesen@simple.dallas.tx.us>
Sat, 27 Sep 2014 07:37:31 +0000 (08:37 +0100)
committerLaszlo Boszormenyi (GCS) <gcs@debian.org>
Sat, 27 Sep 2014 07:37:31 +0000 (08:37 +0100)
Origin: upstream, https://sourceforge.net/p/graphicsmagick/code/ci/6a495ea9d47f42d8e900ac10e7be45892d052feb/
Bug-Debian: https://bugs.debian.org/759956
Last-Update: 2014-09-27

Gbp-Pq: Name AnnotateImage_fix.patch

magick/annotate.c

index d245678577a9d8205c5176c75082651378837b3a..7602db519a2b5c0288e5a8c96d57bff737e5a4b2 100644 (file)
@@ -194,7 +194,7 @@ MagickExport MagickPassFail AnnotateImage(Image *image,const DrawInfo *draw_info
   if (draw_info->text == (char *) NULL)
     return(MagickFail);
   if (*draw_info->text == '\0')
-    return(MagickFail);
+    return(MagickPass);
   text=TranslateText((ImageInfo *) NULL,image,draw_info->text);
   if (text == (char *) NULL)
     ThrowBinaryException3(ResourceLimitError,MemoryAllocationFailed,