Systemd/src/resolve
Zbigniew Jędrzejewski-Szmek 75f32f047c Add memcpy_safe
ISO/IEC 9899:1999 §7.21.1/2 says:
Where an argument declared as size_t n specifies the length of the array
for a function, n can have the value zero on a call to that
function. Unless explicitly stated otherwise in the description of a
particular function in this subclause, pointer arguments on such a call
shall still have valid values, as described in 7.1.4.

In base64_append_width memcpy was called as memcpy(x, NULL, 0).  GCC 4.9
started making use of this and assumes This worked fine under -O0, but
does something strange under -O3.

This patch fixes a bug in base64_append_width(), fixes a possible bug in
journal_file_append_entry_internal(), and makes use of the new function
to simplify the code in other places.
2016-02-11 13:07:02 -05:00
..
.gitignore resolve: add more record types and convert to gperf table 2014-08-03 22:02:32 -04:00
Makefile resolved: add daemon to manage resolv.conf 2014-05-19 18:14:56 +02:00
RFCs resolved: update RFCs list and TODO list 2016-01-17 20:47:46 +01:00
dns-type.c resolve-host: allow specifying type as TYPEnn 2016-01-29 12:13:08 -05:00
dns-type.h resolve-host: allow specifying type as TYPEnn 2016-01-29 12:13:08 -05:00
org.freedesktop.resolve1.conf resolved: add legacy dbus service and policy files 2014-07-16 03:41:39 +02:00
org.freedesktop.resolve1.service resolved: add legacy dbus service and policy files 2014-07-16 03:41:39 +02:00
resolve-tool.c resolve-host: add option to list protocols 2016-01-29 12:13:08 -05:00
resolved-bus.c resolved: teach resolved the difference between "routing" and "search" domains 2016-01-26 14:42:04 +01:00
resolved-bus.h resolved: expose bus objects for each Link 2016-01-19 21:56:54 +01:00
resolved-conf.c resolved: allow configuration of routing domains in Domains= 2016-01-26 14:42:04 +01:00
resolved-conf.h resolved,networkd: unify ResolveSupport enum 2016-01-05 17:30:51 +01:00
resolved-def.h resolved: add packet header details for mDNS 2015-12-08 16:41:45 +01:00
resolved-dns-answer.c resolved: when we find a DNAME RR, don't insist in a signed CNAME RR 2016-01-17 21:50:10 +01:00
resolved-dns-answer.h resolved: when we find a DNAME RR, don't insist in a signed CNAME RR 2016-01-17 21:50:10 +01:00
resolved-dns-cache.c resolved: never store NSEC/NSEC3 RRs from the upper zone of a zone cut in cache 2016-01-25 17:19:19 +01:00
resolved-dns-cache.h resolved: when caching negative responses, honour NSEC/NSEC3 TTLs 2016-01-05 01:35:28 +01:00
resolved-dns-dnssec.c resolved: allow building without libgcrypt 2016-01-31 23:54:12 +01:00
resolved-dns-dnssec.h resolved: make dnssec_nsec_test_enclosed() static 2016-01-31 23:54:12 +01:00
resolved-dns-packet.c Add memcpy_safe 2016-02-11 13:07:02 -05:00
resolved-dns-packet.h resolved: fix mDNS IPv6 multicast address 2016-01-19 14:11:05 +01:00
resolved-dns-query.c resolved: teach resolved the difference between "routing" and "search" domains 2016-01-26 14:42:04 +01:00
resolved-dns-query.h resolved: replace DNS_TRANSACTION_RESOURCES by DNS_TRANSACTION_ERRNO 2016-01-25 17:19:19 +01:00
resolved-dns-question.c resolved: never consider following a CNAME/DNAME chain for a CNAME/DNAME lookup 2016-01-18 23:31:16 +01:00
resolved-dns-question.h resolved: never consider following a CNAME/DNAME chain for a CNAME/DNAME lookup 2016-01-18 23:31:16 +01:00
resolved-dns-rr.c resolved: add macro to compare sized fields 2016-01-29 12:24:14 -05:00
resolved-dns-rr.h resolved: add macro to compare sized fields 2016-01-29 12:24:14 -05:00
resolved-dns-scope.c resolve: generate a nice clean error when clients try to resolve a name when the network is down 2016-01-25 15:59:40 +01:00
resolved-dns-scope.h resolve: generate a nice clean error when clients try to resolve a name when the network is down 2016-01-25 15:59:40 +01:00
resolved-dns-search-domain.c resolved: teach resolved the difference between "routing" and "search" domains 2016-01-26 14:42:04 +01:00
resolved-dns-search-domain.h resolved: teach resolved the difference between "routing" and "search" domains 2016-01-26 14:42:04 +01:00
resolved-dns-server.c resolved: log server type when switching servers 2016-01-29 12:24:15 -05:00
resolved-dns-server.h resolved: log server type when switching servers 2016-01-29 12:24:15 -05:00
resolved-dns-stream.c resolved: set a description on all our event sources 2016-01-11 19:39:59 +01:00
resolved-dns-stream.h remove unused includes 2015-02-23 23:53:42 +01:00
resolved-dns-synthesize.c resolved: synthesize RRs for data from /etc/hosts 2016-01-25 17:19:19 +01:00
resolved-dns-synthesize.h resolved: synthesize RRs for data from /etc/hosts 2016-01-25 17:19:19 +01:00
resolved-dns-transaction.c resolve: fix typos 2016-02-01 21:08:00 +01:00
resolved-dns-transaction.h resolved: replace DNS_TRANSACTION_RESOURCES by DNS_TRANSACTION_ERRNO 2016-01-25 17:19:19 +01:00
resolved-dns-trust-anchor.c resolved: rename dnssec_verify_dnskey() → dnssec_verify_dnskey_by_ds() 2016-01-17 20:47:45 +01:00
resolved-dns-trust-anchor.h resolved: when validating, first strip revoked trust anchor keys from validated keys list 2016-01-11 19:39:59 +01:00
resolved-dns-zone.c resolved: internalize string buffer of dns_resource_record_to_string() 2015-12-26 19:09:10 +01:00
resolved-dns-zone.h resolved: chase DNSKEY/DS RRs when doing look-ups with DNSSEC enabled 2015-12-10 11:35:52 +01:00
resolved-etc-hosts.c resolve: fix compare function for EtcHostItem 2016-01-26 20:34:21 +01:00
resolved-etc-hosts.h resolved: synthesize RRs for data from /etc/hosts 2016-01-25 17:19:19 +01:00
resolved-gperf.gperf resolved: remove configuration knobs for mDNS until it's ready 2016-01-19 14:11:05 +01:00
resolved-link-bus.c resolved: teach resolved the difference between "routing" and "search" domains 2016-01-26 14:42:04 +01:00
resolved-link-bus.h resolved: add SetLinkXYZ() method counterparts on the Link object 2016-01-19 21:56:54 +01:00
resolved-link.c resolved: teach resolved the difference between "routing" and "search" domains 2016-01-26 14:42:04 +01:00
resolved-link.h resolved: when checking whether a link is relevant, check kernel operstate 2016-01-25 15:59:40 +01:00
resolved-llmnr.c resolved: set a description on all our event sources 2016-01-11 19:39:59 +01:00
resolved-llmnr.h resolved: use a #define for LLMNR port 2015-07-13 11:28:29 -04:00
resolved-manager.c resolved: emit full path to file we failed to write 2016-01-28 18:34:38 -05:00
resolved-manager.h networkd: rework Domains= setting 2016-01-26 14:42:03 +01:00
resolved-mdns.c resolved,networkd: unify ResolveSupport enum 2016-01-05 17:30:51 +01:00
resolved-mdns.h resolved: add infrastructure for mDNS related sockets 2015-12-08 16:37:40 +01:00
resolved-resolv-conf.c resolved: emit full path to file we failed to write 2016-01-28 18:34:38 -05:00
resolved-resolv-conf.h resolved: emit full path to file we failed to write 2016-01-28 18:34:38 -05:00
resolved.c resolved: emit full path to file we failed to write 2016-01-28 18:34:38 -05:00
resolved.conf.in resolved: remove configuration knobs for mDNS until it's ready 2016-01-19 14:11:05 +01:00
test-dnssec-complex.c resolve: Silence build warning, when systemd is built without libidn 2016-02-01 21:10:03 +01:00
test-dnssec.c resolved: rename dnssec_verify_dnskey() → dnssec_verify_dnskey_by_ds() 2016-01-17 20:47:45 +01:00
test-resolve-tables.c test-resolve-tables: new "test", useful to print mappings 2016-01-29 12:13:08 -05:00