Commit Diff
Diff:
d9c1cf34dd4679b1972b2f690b14ca28b091555e
0f65e2eeba3dd0b2a9b54caff92d8469e0c31921
Commit:
0f65e2eeba3dd0b2a9b54caff92d8469e0c31921
Tree:
1393656e71fb563cd97d57ad3515dea6273c64fa
Author:
pbug <pbug@delphinusdns.org>
Committer:
pbug <pbug@delphinusdns.org>
Date:
Mon Feb 28 21:04:56 2011 UTC
Message:
* this fix is needed because this function is based on compress_label() in main.c which was recently fixed.
blob - bdd3905d8cad3294729c8ee4c9f6b7b331853b30
blob + 2dfafc999c8c4e3bd3a3b533dd6b5290beaa742c
--- recurse.c
+++ recurse.c
@@ -87,7 +87,7 @@ struct recurseentry {
} *rn1, *rn2, *rnp;
-static const char rcsid[] = "$Id: recurse.c,v 1.33 2011/02/13 18:06:53 pbug Exp $";
+static const char rcsid[] = "$Id: recurse.c,v 1.34 2011/02/28 21:04:56 pbug Exp $";
/*
* INIT_RECURSE - initialize the recurse singly linked list
@@ -936,6 +936,9 @@ recurse_parse(DB *db, struct recurses *sr, u_char *buf
a = (struct answer *)p;
p += sizeof(struct answer);
+
+ if (p > end)
+ goto end;
switch (ntohs(a->type)) {
case DNS_TYPE_A:
repomaster@centroid.eu