From f85c23180661b5f213d5ecefb563bb34edd821fa Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 16 Jul 2018 18:00:25 -0400 Subject: [PATCH] ... --- coders/svg.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/coders/svg.c b/coders/svg.c index ebbecba4a..4505bb483 100644 --- a/coders/svg.c +++ b/coders/svg.c @@ -568,17 +568,21 @@ static void SVGStripString(char *message) /* Remove comment. */ + q=message; for (p=message; *p != '\0'; p++) { if ((*p == '/') && (*(p+1) == '*')) { - for (q=p; *q != '\0'; q++) - if ((*q == '*') && (*(q+1) == '/')) + for ( ; *p != '\0'; p++) + if ((*p == '*') && (*(p+1) == '/')) break; - (void) memcpy(p,q+2,strlen(message)-(q-p)); - p=message; + if (*p == '\0') + break; + p+=2; } + *q++=(*p); } + *q='\0'; /* Remove whitespace. */ -- 2.40.0