mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-01-07 00:50:00 +01:00
Yet more 32 bit clamping.
This commit is contained in:
parent
df1ec6dd08
commit
36cc464d2b
5
stream.c
5
stream.c
|
|
@ -999,8 +999,11 @@ void *open_stream_out(rzip_control *control, int f, unsigned int n, i64 chunk_li
|
|||
limit = (control->usable_ram - (control->overhead * control->threads)) / testbufs;
|
||||
limit = MIN(limit, chunk_limit);
|
||||
}
|
||||
if (BITS32) // Shouldn't be higher than this by now, but just in case
|
||||
if (BITS32) {
|
||||
limit = MIN(limit, one_g);
|
||||
if (limit + (control->overhead * control->threads) > one_g)
|
||||
limit = one_g - (control->overhead * control->threads);
|
||||
}
|
||||
/* Use a nominal minimum size should we fail all previous shrinking */
|
||||
limit = MAX(limit, STREAM_BUFSIZE);
|
||||
retest_malloc:
|
||||
|
|
|
|||
Loading…
Reference in a new issue