]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix segfault in http_copy_decode() - wasn't checking for a NULL term
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 1 Feb 2006 14:58:46 +0000 (14:58 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 1 Feb 2006 14:58:46 +0000 (14:58 +0000)
character.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@5035 7a7537e8-13f0-0310-91df-b6672ffda945

cups/http-support.c

index 6855c2d1e1ea78da184781763eeaedcb42438ddb..83d6a91dda1e27a2399348eaf1f4851d6e912eb8 100644 (file)
@@ -1192,7 +1192,9 @@ http_copy_decode(char       *dst, /* O - Destination buffer */
   * or the end of the string.
   */
 
-  for (ptr = dst, end = dst + dstsize - 1; *src && !strchr(term, *src); src ++)
+  for (ptr = dst, end = dst + dstsize - 1;
+       *src && (!term || !strchr(term, *src));
+       src ++)
     if (ptr < end)
     {
       if (*src == '%' && decode)