spegla.patch 619 B

123456789101112131415161718192021222324252627282930
  1. --- e_err.c.orig Sun May 14 23:39:39 2000
  2. +++ e_err.c Thu Feb 1 15:38:37 2001
  3. @@ -115,6 +115,7 @@
  4. }
  5. res = vsnprintf(p, len, fmt, args);
  6. + if (res >= len) res = len - 1;
  7. len -= res;
  8. p += res;
  9. --- spegla.c.orig Sat May 27 22:38:14 2000
  10. +++ spegla.c Thu Feb 1 15:39:24 2001
  11. @@ -728,7 +728,7 @@
  12. #ifdef ULTRIX
  13. if ((f.fd_req.bfreen * 1024) < minfree)
  14. #else
  15. - if ((f.f_bsize * f.f_bavail) < minfree)
  16. + if (((long long)f.f_bsize * f.f_bavail) < minfree)
  17. #endif
  18. e_errx(1, "%s: Not enough space left", path);
  19. @@ -953,6 +953,7 @@
  20. }
  21. buf[i] = p[j];
  22. }
  23. + buf[i] = '\0';
  24. *val = buf;
  25. ret:
  26. if (show)