summaryrefslogtreecommitdiff
path: root/lib/security.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-11-07 10:55:25 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-11-11 10:03:48 +0100
commit0649433da53c7165f839e24e889e131e2894dd32 (patch)
tree7e516c1702fe87c09f190e5dc47ecd3a9bede1b8 /lib/security.c
parentcdfda3ee827da069f1871722278fd82e7cbb4194 (diff)
downloadcurl-0649433da53c7165f839e24e889e131e2894dd32.tar.gz
realloc: use Curl_saferealloc to avoid common mistakes
Discussed: https://curl.haxx.se/mail/lib-2016-11/0087.html
Diffstat (limited to 'lib/security.c')
-rw-r--r--lib/security.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/security.c b/lib/security.c
index ff2606669..87c22da07 100644
--- a/lib/security.c
+++ b/lib/security.c
@@ -62,7 +62,7 @@
#include "sendf.h"
#include "strcase.h"
#include "warnless.h"
-
+#include "strdup.h"
/* The last #include file should be: */
#include "memdebug.h"
@@ -202,7 +202,7 @@ static CURLcode read_data(struct connectdata *conn,
if(len) {
/* only realloc if there was a length */
len = ntohl(len);
- tmp = realloc(buf->data, len);
+ tmp = Curl_saferealloc(buf->data, len);
}
if(tmp == NULL)
return CURLE_OUT_OF_MEMORY;