artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3363509
)
(void) cast snprintf that cannot truncate
author
gilles
<gilles@openbsd.org>
Sat, 19 Apr 2014 17:32:58 +0000
(17:32 +0000)
committer
gilles
<gilles@openbsd.org>
Sat, 19 Apr 2014 17:32:58 +0000
(17:32 +0000)
usr.sbin/smtpd/esc.c
patch
|
blob
|
history
diff --git
a/usr.sbin/smtpd/esc.c
b/usr.sbin/smtpd/esc.c
index
7bccc22
..
32bcbfd
100644
(file)
--- a/
usr.sbin/smtpd/esc.c
+++ b/
usr.sbin/smtpd/esc.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: esc.c,v 1.
1 2014/02/04 15:44:05 eric Exp $
*/
+/* $OpenBSD: esc.c,v 1.
2 2014/04/19 17:32:58 gilles Exp $
*/
/*
* Copyright (c) 2014 Gilles Chehade <gilles@poolp.org>
@@
-120,7
+120,7
@@
esc_code(enum enhanced_status_class class, enum enhanced_status_code code)
{
static char buffer[6];
- snprintf(buffer, sizeof buffer, "%d.%d.%d", class, code / 10, code % 10);
+
(void)
snprintf(buffer, sizeof buffer, "%d.%d.%d", class, code / 10, code % 10);
return buffer;
}