diff options
Diffstat (limited to 'src/tool_cb_wrt.c')
-rw-r--r-- | src/tool_cb_wrt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c index 3a2cd791a..16edd7199 100644 --- a/src/tool_cb_wrt.c +++ b/src/tool_cb_wrt.c @@ -51,6 +51,10 @@ 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) { |