From 276e9fa5f381ef911ae07945ffd27ba7fa0e472f Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Sat, 18 Jul 2015 16:59:00 +0200 Subject: [PATCH] Zero size only allowed for non repeating rdfs --- src/rr-iter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rr-iter.c b/src/rr-iter.c index 25a01561..7b980ef1 100644 --- a/src/rr-iter.c +++ b/src/rr-iter.c @@ -253,10 +253,12 @@ rdf_iter_find_nxt(priv_getdns_rdf_iter *i) if (!(i->nxt = i->rdd_pos->special->rdf_end( i->pkt, i->pkt_end, i->pos))) i->nxt = i->end; + } else /* RDF is for remaining data */ i->nxt = i->end; - if (i->nxt <= i->end) + if ( i->nxt <= i->end + && (i->nxt > i->pos || !(i->rdd_pos->type & GETDNS_RDF_REPEAT))) return i; done: i->pos = NULL;