aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-09-26 13:44:24 +0200
committerYang Tse <yangsita@gmail.com>2011-09-26 13:44:24 +0200
commitd43983062111ebcd5d69d8347d64458463e9fa23 (patch)
tree1acdc1468d7d6ba6e91a2f088caf1c0a34a0784c /src
parentf4853db5e601030690dfbd78119a38999d6e1577 (diff)
curl tool: fix some OOM handling - f4853db5 follow-up
Diffstat (limited to 'src')
-rw-r--r--src/tool_cb_hdr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c
index e90a4e589..bea407a1c 100644
--- a/src/tool_cb_hdr.c
+++ b/src/tool_cb_hdr.c
@@ -47,6 +47,7 @@ size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata)
const char *str = ptr;
const size_t cb = size * nmemb;
const char *end = (char*)ptr + cb;
+ struct Configurable *config = outs->config;
/*
* Once that libcurl has called back tool_header_cb() the returned value
@@ -57,7 +58,7 @@ size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata)
size_t failure = (size * nmemb) ? 0 : 1;
#ifdef DEBUGBUILD
- if(sz * nmemb > (size_t)CURL_MAX_WRITE_SIZE) {
+ if(size * nmemb > (size_t)CURL_MAX_WRITE_SIZE) {
warnf(config, "Header data exceeds single call write limit!\n");
return failure;
}