diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-18 03:30:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-18 03:30:17 +0300 |
commit | 37d798e82c029b4cbd2c773266b851b2bf78e920 (patch) | |
tree | fb2aebb557d6606e8e90e661f4f9fde1224d5671 | |
parent | c55d293a56855842884f1f526834bf1884f36043 (diff) | |
download | manaverse-37d798e82c029b4cbd2c773266b851b2bf78e920.tar.gz manaverse-37d798e82c029b4cbd2c773266b851b2bf78e920.tar.bz2 manaverse-37d798e82c029b4cbd2c773266b851b2bf78e920.tar.xz manaverse-37d798e82c029b4cbd2c773266b851b2bf78e920.zip |
Limit each downloaded file by curl to 536870912 bytes.
-rw-r--r-- | src/net/download.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp index 8fd8bfd1e..45f2989c0 100644 --- a/src/net/download.cpp +++ b/src/net/download.cpp @@ -562,7 +562,7 @@ void Download::addProxy(CURL *const curl) } } -#if LIBCURL_VERSION_NUM >= 0x070f01 +#if LIBCURL_VERSION_NUM >= 0x070a08 void Download::secureCurl(CURL *const curl) #else // LIBCURL_VERSION_NUM >= 0x070f01 void Download::secureCurl(CURL *const curl A_UNUSED) @@ -580,6 +580,9 @@ void Download::secureCurl(CURL *const curl A_UNUSED) #if LIBCURL_VERSION_NUM >= 0x070f01 curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 3); #endif // LIBCURL_VERSION_NUM >= 0x070f01 +#if LIBCURL_VERSION_NUM >= 0x070a08 + curl_easy_setopt(curl, CURLOPT_MAXFILESIZE, 536870912); +#endif // LIBCURL_VERSION_NUM >= 0x070a08 } #if LIBCURL_VERSION_NUM >= 0x071507 |