summaryrefslogtreecommitdiff
path: root/util/data/msgparse.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2013-04-05 09:06:26 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2013-04-05 09:06:26 +0000
commit697291b66c481c617cf9875497e2189bc4a4b096 (patch)
tree5c98c370bedd1d0b4cc456b94e1f7a8ceb080bff /util/data/msgparse.c
parentafb79913ce00d885b8b43f7478e1e054edadb567 (diff)
Import unbound 1.4.20vendor/unbound/1.4.20
Notes
svn path=/vendor/unbound/dist/; revision=249136 svn path=/vendor/unbound/1.4.20/; revision=249138; tag=vendor/unbound/1.4.20
Diffstat (limited to 'util/data/msgparse.c')
-rw-r--r--util/data/msgparse.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/data/msgparse.c b/util/data/msgparse.c
index a03f543e827b..2791ae560865 100644
--- a/util/data/msgparse.c
+++ b/util/data/msgparse.c
@@ -39,7 +39,6 @@
#include "config.h"
#include <ldns/ldns.h>
#include "util/data/msgparse.h"
-#include "util/net_help.h"
#include "util/data/dname.h"
#include "util/data/packed_rrset.h"
#include "util/storage/lookup3.h"
@@ -655,8 +654,10 @@ calc_size(ldns_buffer* pkt, uint16_t type, struct rr_parse* rr)
len = 0;
break;
case LDNS_RDF_TYPE_STR:
- if(pkt_len < 1)
+ if(pkt_len < 1) {
+ /* NOTREACHED, due to 'while(>0)' */
return 0; /* len byte exceeds rdata */
+ }
len = ldns_buffer_current(pkt)[0] + 1;
break;
default: