]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authoranthony <anthony@git.imagemagick.org>
Fri, 18 May 2012 03:40:40 +0000 (03:40 +0000)
committeranthony <anthony@git.imagemagick.org>
Fri, 18 May 2012 03:40:40 +0000 (03:40 +0000)
MagickCore/property.c

index 14df007506c8d6f53ea9ffb53e658a1bd5e8d6e2..4dea2145bbde944b242728e0bf6fc536fecf3277 100644 (file)
@@ -3039,11 +3039,18 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
     }
     p++; /* advance beyond the percent */
 
+    if ( *p == '\0' ) {
+      (void) ThrowMagickException(exception,GetMagickModule(),
+          OptionWarning,"UnknownImageProperty","\"%%\"");
+      p--;
+      continue;
+    }
+
     /*
       Doubled Percent
     */
     if ( *p == '%' ) {
-        *q++=(*p);
+        *q++='%';
         continue;
       }