summaryrefslogtreecommitdiff
path: root/gnu/usr.sbin/sendmail
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2005-04-19 03:41:12 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2005-04-19 03:41:12 +0000
commit69895667146724ae5945773aaefb563ce5e07704 (patch)
tree8708786aeefcbaf28e4e5c1b174a3fae6aef6997 /gnu/usr.sbin/sendmail
parent11d0ac97e41c0d0428aafe629446f43c0578de62 (diff)
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.
Diffstat (limited to 'gnu/usr.sbin/sendmail')
-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();