Merge pull request #15 from funman/master

Fix 32 bits overflow with -M option
This commit is contained in:
Sam Hocevar 2016-06-03 01:01:57 +02:00
commit 171cf4fa41

View File

@ -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