DOMjudge / domjudge

DOMjudge programming contest jury system
https://www.domjudge.org
GNU General Public License v2.0
701 stars 249 forks source link

Set errno to zero before strtol #2503

Closed wx-csy closed 2 months ago

wx-csy commented 2 months ago

According to the manpage of strtol (Notes), we have to zero errno before calling strtol if we want to use errno to determine if an error occurred.

I've corrected (hopefully) all such bugs in runguard, where some prevented me successfully running judgehost on our server. Not sure whether such kind of bugs exist elsewhere in this project.

wx-csy commented 2 months ago

LGTM, please squash to a single commit.

Done!