[systemd-commits] src/resolve
David Herrmann
dvdhrm at kemper.freedesktop.org
Thu Nov 27 07:41:52 PST 2014
src/resolve/resolved-dns-packet.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 59aa582137cab11ff6aeb9adc56b9e70c4d320ae
Author: Stanisław Pitucha <viraptor at gmail.com>
Date: Tue Nov 18 16:40:18 2014 +1100
resolve: set error code on failure
Set the error code in case of incorrect name. This prevents continuing
and failing an assert(name) later on.
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
index 2afb8d0..c587a56 100644
--- a/src/resolve/resolved-dns-packet.c
+++ b/src/resolve/resolved-dns-packet.c
@@ -928,8 +928,10 @@ int dns_packet_read_name(DnsPacket *p, char **_ret,
/* Jumps are limited to a "prior occurence" (RFC-1035 4.1.4) */
jump_barrier = ptr;
p->rindex = ptr;
- } else
+ } else {
+ r = -EBADMSG;
goto fail;
+ }
}
if (!GREEDY_REALLOC(ret, allocated, n + 1)) {
More information about the systemd-commits
mailing list