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.
This commit is contained in:
committed by
David Herrmann
parent
c75dbf9bea
commit
59aa582137
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user