summaryrefslogtreecommitdiff
path: root/lib/libsectok/r1r2.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-02 22:57:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-02 22:57:52 +0000
commit8e063571fdde4e20da0cef6e3364783f48cbddee (patch)
treeb3e6191ce7254b77758646897d9d35fcb09f8ca7 /lib/libsectok/r1r2.c
parentf462d26dc6fb8c2d6c102de8dfd5ecf077570804 (diff)
the obvious simple snprintf changes
Diffstat (limited to 'lib/libsectok/r1r2.c')
-rw-r--r--lib/libsectok/r1r2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libsectok/r1r2.c b/lib/libsectok/r1r2.c
index 511da002945..464dd5d5ac0 100644
--- a/lib/libsectok/r1r2.c
+++ b/lib/libsectok/r1r2.c
@@ -1,4 +1,4 @@
-/* $Id: r1r2.c,v 1.8 2001/08/02 17:02:05 rees Exp $ */
+/* $Id: r1r2.c,v 1.9 2003/04/02 22:57:51 deraadt Exp $ */
/*
copyright 1999
@@ -133,9 +133,9 @@ char *sectok_get_sw(int sw)
s = scsws(sw);
if (s)
- sprintf(buf, "%04x %s", sw, s);
+ snprintf(buf, sizeof buf, "%04x %s", sw, s);
else
- sprintf(buf, "%04x", sw);
+ snprintf(buf, sizeof buf, "%04x", sw);
return buf;
}
@@ -153,7 +153,7 @@ static char *scsws(int sw)
if (sectok_r2(r1r2s[i].sw) != 0xff)
return r1r2s[i].s;
- sprintf(buf, r1r2s[i].s, r2);
+ snprintf(buf, sizeof buf, r1r2s[i].s, r2);
return buf;
}