oops, d can be NULL !
authorPierre Habouzit <madcoder@debian.org>
Sun, 3 Dec 2006 19:29:09 +0000 (20:29 +0100)
committerPierre Habouzit <madcoder@debian.org>
Sun, 3 Dec 2006 19:29:09 +0000 (20:29 +0100)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
alias.c

diff --git a/alias.c b/alias.c
index fdf74c0..5eab9db 100644 (file)
--- a/alias.c
+++ b/alias.c
@@ -160,7 +160,8 @@ static int alias_sanitize(const char *s, char *d)
         s++;
     }
 
-    *d = '\0';
+    if (d)
+        *d = '\0';
     return rv;
 }