diff options
author | 2005-04-19 03:41:11 +0000 | |
---|---|---|
committer | 2005-04-19 03:41:11 +0000 | |
commit | 949be9c48245822ef9ca0138ee7c47a095b84127 (patch) | |
tree | 127685f6a7d76996963025db5379337163481228 | |
parent | Goodbye goodbye, parting is such sweet sorrow. Away and to the attic with you. (diff) | |
download | wireguard-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.c | 6 |
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(); |