From 88983a489214f69f652fda6656811542075bc82a Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 18 Jun 2015 16:51:03 +0200 Subject: [PATCH] Isolate: Added missing typecast of memory limit to rlim_t Memory limits greater than 2GB were misapplied on some platforms. --- isolate/isolate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/isolate/isolate.c b/isolate/isolate.c index 4fc6d05..cb33c60 100644 --- a/isolate/isolate.c +++ b/isolate/isolate.c @@ -1,7 +1,7 @@ /* * A Process Isolator based on Linux Containers * - * (c) 2012-2014 Martin Mares + * (c) 2012-2015 Martin Mares * (c) 2012-2014 Bernard Blackham */ @@ -1231,7 +1231,7 @@ setup_rlimits(void) #define RLIM(res, val) setup_rlim("RLIMIT_" #res, RLIMIT_##res, val) if (memory_limit) - RLIM(AS, memory_limit * 1024); + RLIM(AS, (rlim_t)memory_limit * 1024); RLIM(STACK, (stack_limit ? (rlim_t)stack_limit * 1024 : RLIM_INFINITY)); RLIM(NOFILE, 64); -- 2.39.2