]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Add a missing null pointer check in wc_unescape, to bring it in line
authorSimon Tatham <anakin@pobox.com>
Sun, 14 Jul 2013 10:46:17 +0000 (10:46 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 14 Jul 2013 10:46:17 +0000 (10:46 +0000)
with the usage comment saying you're allowed to pass NULL to find out
only the return value. No caller actually does pass NULL at the
moment.

[originally from svn r9920]

wildcard.c

index ae8bad80a675d4ddc12633499996e061390f7cb2..c1cb0b49e657169493aacb48a0d1454426a987e8 100644 (file)
@@ -326,7 +326,8 @@ int wc_unescape(char *output, const char *wildcard)
            wildcard++;
        }
     }
-    *output = '\0';
+    if (output)
+        *output = '\0';
     return 1;                         /* it's clean */
 }