Skip to content

Commit ac19b7d

Browse files
meisterTvmcj
authored andcommitted
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 ``` (cherry picked from commit a12c260)
1 parent 25d5276 commit ac19b7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

judge/runguard.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ void setrestrictions()
780780
setlim(STACK);
781781

782782
if ( filesize!=RLIM_INFINITY ) {
783-
verbose("setting filesize limit to %d bytes",(int)filesize);
783+
verbose("setting filesize limit to %lu bytes",filesize);
784784
lim.rlim_cur = lim.rlim_max = filesize;
785785
setlim(FSIZE);
786786
}

0 commit comments

Comments
 (0)