git.samba.org
/
ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fa2e78
)
Fix CID 1347319 Unchecked return value
author
Volker Lendecke
<vl@samba.org>
Thu, 7 Jan 2016 20:14:05 +0000
(21:14 +0100)
committer
Martin Schwenke
<martin@meltin.net>
Wed, 24 Feb 2016 10:44:28 +0000
(21:44 +1100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(Imported from commit
0cb8b9d113b322f784100365669d2be8b7fa635a
)
common/system_linux.c
patch
|
blob
|
history
diff --git
a/common/system_linux.c
b/common/system_linux.c
index 79d1a83ff1023880b6f23fd9667210252d473082..3bc04ba86426c56ae98c31b8340dcac67023c179 100644
(file)
--- a/
common/system_linux.c
+++ b/
common/system_linux.c
@@
-240,7
+240,13
@@
int ctdb_sys_send_arp(const ctdb_sock_addr *addr, const char *iface)
ip6->ip6_hlim = 255;
ip6->ip6_src = addr->ip6.sin6_addr;
/* all-nodes multicast */
- inet_pton(AF_INET6, "ff02::1", &ip6->ip6_dst);
+
+ ret = inet_pton(AF_INET6, "ff02::1", &ip6->ip6_dst);
+ if (ret != 1) {
+ close(s);
+ DEBUG(DEBUG_CRIT,(__location__ " failed inet_pton\n"));
+ return -1;
+ }
nd_na = (struct nd_neighbor_advert *)(ip6+1);
nd_na->nd_na_type = ND_NEIGHBOR_ADVERT;