From: cristy Date: Sat, 27 Dec 2014 20:04:16 +0000 (+0000) Subject: http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=26787 X-Git-Tag: 7.0.1-0~1534 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=26f64583b667398ca0a12bfd7a560b15567b76b8;p=imagemagick http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=26787 --- diff --git a/coders/xpm.c b/coders/xpm.c index 10d5337af..8c3e9d6e7 100644 --- a/coders/xpm.c +++ b/coders/xpm.c @@ -157,7 +157,7 @@ static size_t CopyXPMColor(char *destination,const char *source,size_t length) *p; p=source; - while (--length && (*p != '\0')) + while (length-- && (*p != '\0')) *destination++=(*p++); *destination='\0'; return((size_t) (p-source));