From: Simon Tatham Date: Sun, 14 Jul 2013 10:46:17 +0000 (+0000) Subject: Add a missing null pointer check in wc_unescape, to bring it in line X-Git-Tag: 0.63~72 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=74cf14e4ebc2c3190e35095ad2d11336c4b4bc2c;p=PuTTY.git Add a missing null pointer check in wc_unescape, to bring it in line 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] --- diff --git a/wildcard.c b/wildcard.c index ae8bad80..c1cb0b49 100644 --- a/wildcard.c +++ b/wildcard.c @@ -326,7 +326,8 @@ int wc_unescape(char *output, const char *wildcard) wildcard++; } } - *output = '\0'; + if (output) + *output = '\0'; return 1; /* it's clean */ }