summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2005-04-19 03:41:11 +0000
committermillert <millert@openbsd.org>2005-04-19 03:41:11 +0000
commit949be9c48245822ef9ca0138ee7c47a095b84127 (patch)
tree127685f6a7d76996963025db5379337163481228
parentGoodbye goodbye, parting is such sweet sorrow. Away and to the attic with you. (diff)
downloadwireguard-openbsd-949be9c48245822ef9ca0138ee7c47a095b84127.tar.xz
wireguard-openbsd-949be9c48245822ef9ca0138ee7c47a095b84127.zip
Use snprintf, not sprintf for floating point conversion. While the actual
usage of sprintf here is safe, we'd rather not have the linker warnings.
-rw-r--r--gnu/usr.sbin/sendmail/libsm/vfprintf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/usr.sbin/sendmail/libsm/vfprintf.c b/gnu/usr.sbin/sendmail/libsm/vfprintf.c
index ca84a5700d1..a338e2b26d7 100644
--- a/gnu/usr.sbin/sendmail/libsm/vfprintf.c
+++ b/gnu/usr.sbin/sendmail/libsm/vfprintf.c
@@ -535,9 +535,11 @@ reswitch: switch (ch)
if (prec > 120)
prec = 120;
if (prec >= 0)
- sprintf(out, fmt, width, prec, val);
+ snprintf(out, sizeof(out), fmt, width,
+ prec, val);
else
- sprintf(out, fmt, width, val);
+ snprintf(out, sizeof(out), fmt, width,
+ val);
len = strlen(out);
PRINT(out, len);
FLUSH();