Fix 32 bits overflow with -M option
$ zzuf -M 4096 -s 0:1 /bin/cat /bin/cat: Argument list too long
This commit is contained in:
parent
14138cd218
commit
a37e3d8af4
@ -262,8 +262,8 @@ static int run_process(zzuf_child_t *child, zzuf_opts_t *opts, int pipes[][2])
|
||||
if (opts->maxmem >= 0)
|
||||
{
|
||||
struct rlimit rlim;
|
||||
rlim.rlim_cur = opts->maxmem * 1048576;
|
||||
rlim.rlim_max = opts->maxmem * 1048576;
|
||||
rlim.rlim_cur = (uint64_t)opts->maxmem * 1048576;
|
||||
rlim.rlim_max = (uint64_t)opts->maxmem * 1048576;
|
||||
setrlimit(ZZUF_RLIMIT_MEM, &rlim);
|
||||
}
|
||||
#endif
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user