Skip to content

Commit

Permalink
Use correct printf format specifier for filesize. (#2158)
Browse files Browse the repository at this point in the history
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
```
  • Loading branch information
meisterT authored Sep 25, 2023
1 parent f9ccdfd commit a12c260
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion judge/runguard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a12c260

Please sign in to comment.