1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00
systemd-stable/src/libsystemd-network
Thomas Haller c24b682162 network: don't return allocated buffer of zero length from deserialize_in_addrs()
deserialize_in_addrs() allocates the buffer before trying to parse
the IP address. Since a parsing error is silently ignored, the returned
size might be zero. In such a case we shouldn't return any buffer.

Anyway, there was no leak, because there are only two callers like

    r = deserialize_in_addrs(&lease->dns, dns);

which both keep the unused buffer and later release it.

Note that deserialize_in_addrs() doesn't free the pointer before
reassigning the new output. The caller must take care to to pass
"ret" with an allocated buffer that would be leaked when returning
the result.
2019-02-18 13:32:06 +01:00
..
arp-util.c tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
arp-util.h tree-wide: use proper unicode © instead of (C) where we can 2018-06-14 10:20:20 +02:00
dhcp6-internal.h dhcp6: constify things where we can 2018-10-25 11:23:19 +02:00
dhcp6-lease-internal.h dhcp6-client: Store lease timeouts T1 and T1 in client struct 2018-09-19 13:45:18 -06:00
dhcp6-network.c tree-wide: introduce setsockopt_int() helper and make use of it everywhere 2018-10-18 19:50:29 +02:00
dhcp6-option.c dhcp6: prefer offsetof() over sizeof() for structs with undefined sizes 2018-10-25 11:23:19 +02:00
dhcp6-protocol.h tree-wide: use proper unicode © instead of (C) where we can 2018-06-14 10:20:20 +02:00
dhcp-identifier.c dhcp/trivial: fix spelling error in comment 2019-01-25 20:29:39 +09:00
dhcp-identifier.h dhcp6: don't enforce DUID content for sd_dhcp6_client_set_duid() 2018-12-20 13:40:39 +01:00
dhcp-internal.h tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
dhcp-lease-internal.h tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
dhcp-network.c dhcp: ignore padding of 'chaddr' in DHCP server response 2019-02-15 11:41:06 +01:00
dhcp-option.c tree-wide: use proper unicode © instead of (C) where we can 2018-06-14 10:20:20 +02:00
dhcp-packet.c coccinelle: make use of SYNTHETIC_ERRNO 2018-11-22 10:54:38 +01:00
dhcp-protocol.h tree-wide: use proper unicode © instead of (C) where we can 2018-06-14 10:20:20 +02:00
dhcp-server-internal.h tree-wide: make hash_ops typesafe 2018-12-02 07:53:27 +01:00
icmp6-util.c tree-wide: use IOVEC_MAKE() at many places 2018-11-27 10:12:27 +01:00
icmp6-util.h tree-wide: use proper unicode © instead of (C) where we can 2018-06-14 10:20:20 +02:00
lldp-internal.h lldp: improve debug log message 2018-11-06 20:15:09 +09:00
lldp-neighbor.c Use c99 static array size declarations in exported functions too 2019-01-04 12:37:25 +01:00
lldp-neighbor.h lldp: rename lldp_neighbor_id_hash_ops and set value destructor 2018-12-02 12:18:54 +01:00
lldp-network.c util: drop missing.h from util.h 2018-12-04 10:00:34 +01:00
lldp-network.h tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
meson.build Drop my copyright headers 2018-06-14 13:03:20 +02:00
ndisc-internal.h ndisc: improve debug log message 2018-11-06 20:15:09 +09:00
ndisc-router.c resolve: reject host names with leading or trailing dashes in /etc/hosts 2018-12-10 09:56:56 +01:00
ndisc-router.h tree-wide: use proper unicode © instead of (C) where we can 2018-06-14 10:20:20 +02:00
network-internal.c network: don't return allocated buffer of zero length from deserialize_in_addrs() 2019-02-18 13:32:06 +01:00
network-internal.h network: fix handling of uninitialized and zero IAID setting 2018-12-10 14:25:28 +01:00
radv-internal.h libsystemd-network: remove _packed_ attribute to appease the compiler 2019-02-04 20:32:44 +01:00
sd-dhcp6-client.c dhcp6: don't enforce DUID content for sd_dhcp6_client_set_duid() 2018-12-20 13:40:39 +01:00
sd-dhcp6-lease.c sd-dhcp6: do not update serverid when ENOMEM 2018-10-19 06:11:58 +09:00
sd-dhcp-client.c dhcp: ignore padding of 'chaddr' in DHCP server response 2019-02-15 11:41:06 +01:00
sd-dhcp-lease.c resolve: reject host names with leading or trailing dashes in /etc/hosts 2018-12-10 09:56:56 +01:00
sd-dhcp-server.c dhcp: introduce dhcp_lease_hash_ops and use it 2018-12-02 12:17:28 +01:00
sd-ipv4acd.c ipv4acd: do not unref() event sources when update or disable them 2018-11-16 22:57:42 +09:00
sd-ipv4ll.c tree-wide: use DEFINE_TRIVIAL_REF_UNREF_FUNC() macro or friends where applicable 2018-08-27 14:01:46 +09:00
sd-lldp.c util: drop missing.h from socket-util.h 2018-12-06 13:31:16 +01:00
sd-ndisc.c Delete duplicate lines 2019-01-12 16:02:26 +01:00
sd-radv.c networkd: refuse IPv6 RADV prefixes that lack Prefix= setting 2018-11-30 22:19:28 +01:00
test-acd.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-dhcp6-client.c util: drop missing.h from socket-util.h 2018-12-06 13:31:16 +01:00
test-dhcp-client.c dhcp: support endianness independent dhcp_identifier_set_iaid() 2018-11-12 19:08:35 +01:00
test-dhcp-option.c Merge pull request #2589 from keszybz/resolve-tool-2 2016-02-13 11:15:41 +01:00
test-dhcp-server.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-ipv4ll-manual.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-ipv4ll.c libsystemd-network: set SOCK_CLOEXEC and SOCK_NONBLOCK 2018-11-12 02:03:22 +09:00
test-lldp.c lldp: add 802.3 OUI subtype definitions 2018-12-21 17:30:01 +01:00
test-ndisc-ra.c libsystemd-network: set SOCK_CLOEXEC and SOCK_NONBLOCK 2018-11-12 02:03:22 +09:00
test-ndisc-rs.c libsystemd-network: set SOCK_CLOEXEC and SOCK_NONBLOCK 2018-11-12 02:03:22 +09:00
test-sd-dhcp-lease.c network: Implement DHCP Option 119 (Domain Search List) (#5932) 2017-05-13 10:19:32 -04:00