summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorM. Kristall <mkpdev@gmail.com>2011-01-07 03:28:23 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:17:50 +0000
commit9616a85558b5d7b02da1ef157bc805a93dc3c4fd (patch)
treedeb46f675d743fbbdd71b45c1ebf5f66f62abc4f /src
parent54f63a7177674f26e2df2f48dda8d26bf71eb574 (diff)
* Require IPv4 addresses to contain at least one . (use 192./8 instead of 192/8)
Diffstat (limited to 'src')
-rw-r--r--src/game/g_utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/g_utils.c b/src/game/g_utils.c
index 665cab3f..9e53fe7d 100644
--- a/src/game/g_utils.c
+++ b/src/game/g_utils.c
@@ -950,11 +950,13 @@ qboolean G_AddressParse( const char *str, addr_t *addr )
p = addr6parse( str, addr );
max = 128;
}
- else
+ else if( strchr( str, '.' ) )
{
p = addr4parse( str, addr );
max = 32;
}
+ else
+ return qfalse;
Q_strncpyz( addr->str, str, sizeof( addr->str ) );
if( !p )
return qfalse;