aboutsummaryrefslogtreecommitdiff
path: root/external/unbound/smallapp/unbound-anchor.c
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-04-02 11:16:18 +0200
committerRiccardo Spagni <ric@spagni.net>2015-04-02 11:16:18 +0200
commit1f49833d4fc449d54c95c3235b5c18523e6f8d69 (patch)
treeae027273609339b9b89e3e546552af7a7afb23e7 /external/unbound/smallapp/unbound-anchor.c
parentMerge pull request #248 (diff)
downloadmonero-1f49833d4fc449d54c95c3235b5c18523e6f8d69.tar.xz
update unbound from upstream
Diffstat (limited to '')
-rw-r--r--external/unbound/smallapp/unbound-anchor.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/external/unbound/smallapp/unbound-anchor.c b/external/unbound/smallapp/unbound-anchor.c
index 9df0d95b4..576a30f64 100644
--- a/external/unbound/smallapp/unbound-anchor.c
+++ b/external/unbound/smallapp/unbound-anchor.c
@@ -116,7 +116,7 @@
#include "config.h"
#include "libunbound/unbound.h"
-#include "ldns/rrdef.h"
+#include "sldns/rrdef.h"
#include <expat.h>
#ifndef HAVE_EXPAT_H
#error "need libexpat to parse root-anchors.xml file."
@@ -915,7 +915,10 @@ read_data_chunk(SSL* ssl, size_t len)
{
size_t got = 0;
int r;
- char* data = malloc(len+1);
+ char* data;
+ if(len >= 0xfffffff0)
+ return NULL; /* to protect against integer overflow in malloc*/
+ data = malloc(len+1);
if(!data) {
if(verb) printf("out of memory\n");
return NULL;