projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b64de5e
)
ipconfig: Check for NULL pointers before calling inet_pton on them
author
Samuel Ortiz
<sameo@linux.intel.com>
Fri, 15 Apr 2011 18:17:05 +0000
(20:17 +0200)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Sun, 17 Apr 2011 15:25:41 +0000
(17:25 +0200)
src/ipconfig.c
patch
|
blob
|
history
diff --git
a/src/ipconfig.c
b/src/ipconfig.c
index
92ac8f6
..
616cbcb
100644
(file)
--- a/
src/ipconfig.c
+++ b/
src/ipconfig.c
@@
-145,6
+145,9
@@
static gboolean check_ipv6_address(const char *address)
unsigned char buf[sizeof(struct in6_addr)];
int err;
+ if (address == NULL)
+ return FALSE;
+
err = inet_pton(AF_INET6, address, buf);
if (err > 0)
return TRUE;