[systemd-commits] 2 commits - src/libsystemd-network
Tom Gundersen
tomegun at kemper.freedesktop.org
Sun Jun 29 13:27:04 PDT 2014
src/libsystemd-network/network-internal.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 69f08c8338560d5d8192e7d49d21cfe93656385e
Author: Tom Gundersen <teg at jklm.no>
Date: Sun Jun 29 22:26:06 2014 +0200
network-internal: initialize _cleanup_ variable
diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c
index 317d5de..7a7a4ea 100644
--- a/src/libsystemd-network/network-internal.c
+++ b/src/libsystemd-network/network-internal.c
@@ -465,7 +465,7 @@ int deserialize_dhcp_routes(struct sd_dhcp_route **ret, size_t *ret_size, size_t
FOREACH_WORD(word, len, string, state) {
/* WORD FORMAT: dst_ip/dst_prefixlen,gw_ip */
- _cleanup_free_ char* entry;
+ _cleanup_free_ char* entry = NULL;
char *tok, *tok_end;
unsigned n;
int r;
commit 31db01208bfefe2172aacf9c0d1ee3043a4117e3
Author: Susant Sahani <susant at redhat.com>
Date: Mon Jun 30 01:09:08 2014 +0530
netowrkd:deserialize_dhcp_routes verify strndup ret
strndup need to be chcked
diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c
index a5db0c5..317d5de 100644
--- a/src/libsystemd-network/network-internal.c
+++ b/src/libsystemd-network/network-internal.c
@@ -474,6 +474,8 @@ int deserialize_dhcp_routes(struct sd_dhcp_route **ret, size_t *ret_size, size_t
return -ENOMEM;
entry = strndup(word, len);
+ if(!entry)
+ return -ENOMEM;
tok = entry;
More information about the systemd-commits
mailing list