From: Wouter Wijngaards Date: Tue, 1 May 2007 10:08:44 +0000 (+0000) Subject: Fixed so that a pointer to a 0 byte can be decompressed to the root. X-Git-Tag: ldns-1.3.0_pre_20070822~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc0cd336ec52ee6a2fd63fcd85525cff17120bdd;p=thirdparty%2Fldns.git Fixed so that a pointer to a 0 byte can be decompressed to the root. --- diff --git a/wire2host.c b/wire2host.c index 81790fc8..9c477193 100644 --- a/wire2host.c +++ b/wire2host.c @@ -96,6 +96,8 @@ ldns_wire2dname(ldns_rdf **dname, const uint8_t *wire, size_t max, size_t *pos) *pos = pointer_target; label_size = wire[*pos]; } + if(label_size == 0) + break; /* break from pointer to 0 byte */ if (label_size > LDNS_MAX_LABELLEN) { return LDNS_STATUS_LABEL_OVERFLOW; }