diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tool_cb_hdr.c | 7 | ||||
-rw-r--r-- | src/tool_cb_wrt.c | 4 |
2 files changed, 1 insertions, 10 deletions
diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c index 6dcc9f46a..2643ad2cf 100644 --- a/src/tool_cb_hdr.c +++ b/src/tool_cb_hdr.c @@ -47,10 +47,6 @@ size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata) const size_t cb = size * nmemb; const char *end = (char*)ptr + cb; - if(cb >= CURL_WRITEFUNC_PAUSE) - /* CURL_WRITEFUNC_PAUSE limits input size */ - return CURL_WRITEFUNC_OUT_OF_MEMORY; - if(cb > 20 && checkprefix("Content-disposition:", str)) { const char *p = str + 20; @@ -78,13 +74,12 @@ size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata) */ len = (ssize_t)cb - (p - str); filename = parse_filename(p, len); + /* TODO: OOM handling - return (size_t)-1 ? */ if(filename) { outs->filename = filename; outs->alloc_filename = TRUE; break; } - else - return CURL_WRITEFUNC_OUT_OF_MEMORY; } } diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c index 16edd7199..3a2cd791a 100644 --- a/src/tool_cb_wrt.c +++ b/src/tool_cb_wrt.c @@ -51,10 +51,6 @@ size_t tool_write_cb(void *buffer, size_t sz, size_t nmemb, void *userdata) */ const size_t err_rc = (sz * nmemb) ? 0 : 1; - if(sz * nmemb >= CURL_WRITEFUNC_PAUSE) - /* CURL_WRITEFUNC_PAUSE limits input size */ - return CURL_WRITEFUNC_OUT_OF_MEMORY; - if(!out->stream) { out->bytes = 0; /* nothing written yet */ if(!out->filename) { |