fixed make_banmask (do not use a single * as zero auth mask)
authorpk910 <philipp@zoelle1.de>
Fri, 9 Sep 2011 00:37:58 +0000 (02:37 +0200)
committerpk910 <philipp@zoelle1.de>
Fri, 9 Sep 2011 00:38:46 +0000 (02:38 +0200)
tools.c

diff --git a/tools.c b/tools.c
index 2f8427f6efc70b08eb47cff2dcebd41ed2bb30b8..1fc4be91715427259db63ae895494156ccdd675c 100644 (file)
--- a/tools.c
+++ b/tools.c
@@ -452,7 +452,7 @@ char* make_banmask(char *input, char* buffer) {
         host = p+1;
     } else if((p = strstr(input, "."))) {
         host = input;
-    } else if(*input == '*' && !strstr(input+1, "*")) {
+    } else if(*input == '*' && input[1] != '\0' && !strstr(input+1, "*")) {
         //AUTH MASK
         p = getAuthFakehost(input+1);
         if(p)