changeset 24422:64395aea313c

Fix CID #387
author Richard Laager <rlaager@wiktel.com>
date Fri, 14 Nov 2008 06:40:55 +0000
parents 0f035b8db8df
children 8b5b73c768e4
files libpurple/util.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/util.c	Fri Nov 14 06:39:52 2008 +0000
+++ b/libpurple/util.c	Fri Nov 14 06:40:55 2008 +0000
@@ -4196,6 +4196,9 @@
 {
 	int c, o1, o2, o3, o4;
 	char end;
+
+	g_return_val_if_fail(ip != NULL, FALSE);
+
 	c = sscanf(ip, "%d.%d.%d.%d%c", &o1, &o2, &o3, &o4, &end);
 	if (c != 4 || o1 < 0 || o1 > 255 || o2 < 0 || o2 > 255 || o3 < 0 || o3 > 255 || o4 < 0 || o4 > 255)
 		return FALSE;