eboard-1.1.1-ovflfix.patch 853 B

1234567891011121314151617181920212223
  1. --- proto_xboard.cc.old 2010-11-03 16:42:15.000000000 +0100
  2. +++ proto_xboard.cc 2010-11-03 16:43:14.000000000 +0100
  3. @@ -1084,7 +1084,7 @@
  4. snprintf(EngineCommandLine,512,"crafty bookpath=%s logpath=%s tbpath=%s",
  5. BookPath,LogPath,LogPath);
  6. if (!global.env.Home.empty())
  7. - snprintf(EngineRunDir,512,"%s/.eboard/craftylog",global.env.Home.c_str());
  8. + snprintf(EngineRunDir, sizeof(EngineRunDir), "%s/.eboard/craftylog", global.env.Home.c_str());
  9. else
  10. strcpy(EngineRunDir,"/tmp");
  11. --- util.cc.old 2010-11-03 16:42:24.000000000 +0100
  12. +++ util.cc 2010-11-03 16:43:42.000000000 +0100
  13. @@ -783,7 +783,7 @@
  14. int i,n;
  15. char cmd[1024];
  16. - n = snprintf(tmpfile,1024,"/tmp/eb%d-%s",(int) getpid(), origfile);
  17. + n = snprintf(tmpfile, sizeof(tmpfile), "/tmp/eb%d-%s", (int) getpid(), origfile);
  18. if (n >= 1024) {
  19. failure = 1;