From a12c2604f98036297f3ac336971eb584e367168a Mon Sep 17 00:00:00 2001 From: Tobias Werth Date: Mon, 25 Sep 2023 19:55:04 +0200 Subject: [PATCH] Use correct printf format specifier for filesize. (#2158) 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); }