From 43919566220d43a5c34f97bc8353bb2295f32c7d Mon Sep 17 00:00:00 2001 From: Tobias Werth Date: Sun, 24 Sep 2023 17:04:20 +0200 Subject: [PATCH] Use correct printf format specifier for filesize. The default value for filesize for scripts is 2.5GB, so more than 2^31 bytes, previously this caused a message like ``` /home/sitowert/domjudge/bin/runguard [56839 @ 0.001495]: verbose: setting filesize limit to -1610612736 bytes ``` After this commit, it is: ``` /home/sitowert/domjudge/bin/runguard [56839 @ 0.001521]: verbose: setting filesize limit to 2684354560 bytes ``` --- judge/runguard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/judge/runguard.c b/judge/runguard.c index a1097b8b7b..e1dc83f14d 100644 --- a/judge/runguard.c +++ b/judge/runguard.c @@ -799,7 +799,7 @@ void setrestrictions() setlim(STACK); if ( filesize!=RLIM_INFINITY ) { - verbose("setting filesize limit to %d bytes",(int)filesize); + verbose("setting filesize limit to %lu bytes",filesize); lim.rlim_cur = lim.rlim_max = filesize; setlim(FSIZE); }