You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-board/eboard/files/eboard-1.1.1-ovflfix.patch

23 lines
709 B

--- a/proto_xboard.cc
+++ b/proto_xboard.cc
@@ -1084,7 +1084,7 @@
snprintf(EngineCommandLine,512,"crafty bookpath=%s logpath=%s tbpath=%s",
BookPath,LogPath,LogPath);
if (!global.env.Home.empty())
- snprintf(EngineRunDir,512,"%s/.eboard/craftylog",global.env.Home.c_str());
+ snprintf(EngineRunDir, sizeof(EngineRunDir), "%s/.eboard/craftylog", global.env.Home.c_str());
else
strcpy(EngineRunDir,"/tmp");
--- a/util.cc
+++ b/util.cc
@@ -783,7 +783,7 @@
int i,n;
char cmd[1024];
- n = snprintf(tmpfile,1024,"/tmp/eb%d-%s",(int) getpid(), origfile);
+ n = snprintf(tmpfile, sizeof(tmpfile), "/tmp/eb%d-%s", (int) getpid(), origfile);
if (n >= 1024) {
failure = 1;