From 761de0ac8ab7a05a099bc2b23699df481dc3ce29 Mon Sep 17 00:00:00 2001 From: MassimilianoPinto Date: Tue, 21 Oct 2014 17:51:11 +0200 Subject: [PATCH] Removed possible uninitialised pointer value Removed possible uninitialised pointer value in host parsing for wildcard --- server/core/dbusers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/core/dbusers.c b/server/core/dbusers.c index 3b2b36361..69edc4acb 100644 --- a/server/core/dbusers.c +++ b/server/core/dbusers.c @@ -200,7 +200,7 @@ int add_mysql_users_with_host_ipv4(USERS *users, char *user, char *host, char *p tmp = ret_ip+strlen(ret_ip)-1; /* start from Class C */ - while(*tmp) { + while(tmp > ret_ip) { if (*tmp == '%') { /* set only the last IPv4 byte to 1 * avoiding setipadress() failure