mirror of
https://github.com/xroche/httrack.git
synced 2026-07-13 04:09:56 +03:00
Compare commits
1 Commits
fix-test19
...
fix-codeql
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
349c07f4ca |
@@ -3908,10 +3908,11 @@ void back_wait(struct_back * sback, httrackp * opt, cache_back * cache,
|
|||||||
if (fp) {
|
if (fp) {
|
||||||
LLint alloc_mem = resume + 1;
|
LLint alloc_mem = resume + 1;
|
||||||
|
|
||||||
// Reject a hostile Content-Length that would
|
// Bound the in-memory buffer to a 32-bit size (real
|
||||||
// overflow the buffer size: drop the partial and
|
// in-RAM resources are far smaller); a hostile
|
||||||
// refetch.
|
// Content-Length that would overflow the add or the
|
||||||
if (back[i].r.totalsize > INT64_MAX - alloc_mem) {
|
// (size_t) cast is dropped and refetched instead.
|
||||||
|
if (back[i].r.totalsize > INT32_MAX - alloc_mem) {
|
||||||
url_savename_refname_remove(opt, back[i].url_adr,
|
url_savename_refname_remove(opt, back[i].url_adr,
|
||||||
back[i].url_fil);
|
back[i].url_fil);
|
||||||
UNLINK(back[i].url_sav);
|
UNLINK(back[i].url_sav);
|
||||||
|
|||||||
Reference in New Issue
Block a user