summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-22 18:53:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:40 -0500
commit4a40f0310c5a3c375874ef42f12a5c434994f8e9 (patch)
treefc602c5b521775a7187d0dd18c7ebc1b949b3c17 /source4/lib
parentdba738d04434782a009a5140d15bb8c487aff7b3 (diff)
downloadsamba-4a40f0310c5a3c375874ef42f12a5c434994f8e9.tar.gz
samba-4a40f0310c5a3c375874ef42f12a5c434994f8e9.tar.bz2
samba-4a40f0310c5a3c375874ef42f12a5c434994f8e9.zip
r20325: handle NULL strings in is_ipaddress()
metze (This used to be commit b8b69ff6bec0c1d412b1f935721b45ef07e9c9f5)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/util/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/lib/util/util.c b/source4/lib/util/util.c
index 33215a81fb..afa9adbc18 100644
--- a/source4/lib/util/util.c
+++ b/source4/lib/util/util.c
@@ -292,7 +292,9 @@ _PUBLIC_ BOOL is_ipaddress(const char *str)
{
BOOL pure_address = True;
int i;
-
+
+ if (str == NULL) return False;
+
for (i=0; pure_address && str[i]; i++)
if (!(isdigit((int)str[i]) || str[i] == '.'))
pure_address = False;