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