1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r20325: handle NULL strings in is_ipaddress()

metze
(This used to be commit b8b69ff6be)
This commit is contained in:
Stefan Metzmacher 2006-12-22 18:53:39 +00:00 committed by Gerald (Jerry) Carter
parent dba738d044
commit 4a40f0310c

View File

@ -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;