Portable build framework for OpenNTPD
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.

39 lines
1.0 KiB

4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
4 years ago
5 years ago
  1. From 2b3abb5914e6ee355a7eb42e99acbbecf50ed252 Mon Sep 17 00:00:00 2001
  2. From: Brent Cook <busterb@gmail.com>
  3. Date: Sat, 13 Apr 2019 04:45:22 -0500
  4. Subject: [PATCH 15/15] increase buffer sizes potential truncation
  5. ---
  6. src/usr.sbin/ntpd/ntpd.c | 2 +-
  7. src/usr.sbin/ntpd/util.c | 2 +-
  8. 2 files changed, 2 insertions(+), 2 deletions(-)
  9. diff --git a/src/usr.sbin/ntpd/ntpd.c b/src/usr.sbin/ntpd/ntpd.c
  10. index 5817fff78a..bae6abd00f 100644
  11. --- a/src/usr.sbin/ntpd/ntpd.c
  12. +++ b/src/usr.sbin/ntpd/ntpd.c
  13. @@ -909,7 +909,7 @@ show_peer_msg(struct imsg *imsg, int calledfromshowall)
  14. {
  15. struct ctl_show_peer *cpeer;
  16. int cnt;
  17. - char stratum[3];
  18. + char stratum[4];
  19. static int firsttime = 1;
  20. if (imsg->hdr.type == IMSG_CTL_SHOW_PEERS_END) {
  21. diff --git a/src/usr.sbin/ntpd/util.c b/src/usr.sbin/ntpd/util.c
  22. index be113ba856..65eb9018bb 100644
  23. --- a/src/usr.sbin/ntpd/util.c
  24. +++ b/src/usr.sbin/ntpd/util.c
  25. @@ -141,7 +141,7 @@ d_to_sfp(double d)
  26. char *
  27. print_rtable(int r)
  28. {
  29. - static char b[11];
  30. + static char b[18];
  31. b[0] = 0;
  32. if (r > 0)
  33. --
  34. 2.27.0