projects
/
oweals
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b077337
)
interface-ip.c: fix possible null pointer access if calloc() fails
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 13 Sep 2012 06:56:14 +0000
(09:56 +0300)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 13 Sep 2012 06:56:14 +0000
(09:56 +0300)
interface-ip.c
patch
|
blob
|
history
diff --git
a/interface-ip.c
b/interface-ip.c
index 0610ffde65311378ab0befab1207c69cd07aa7e3..d5488efafbe18fbd32d5d602262601484f5d2046 100644
(file)
--- a/
interface-ip.c
+++ b/
interface-ip.c
@@
-430,6
+430,9
@@
interface_add_dns_server(struct interface_ip_settings *ip, const char *str)
struct dns_server *s;
s = calloc(1, sizeof(*s));
+ if (!s)
+ return;
+
s->af = AF_INET;
if (inet_pton(s->af, str, &s->addr.in))
goto add;