diff options
Diffstat (limited to 'lib/libsectok')
-rw-r--r-- | lib/libsectok/cmdtab.c | 4 | ||||
-rw-r--r-- | lib/libsectok/r1r2.c | 8 | ||||
-rw-r--r-- | lib/libsectok/sc7816.c | 6 | ||||
-rw-r--r-- | lib/libsectok/scio.c | 6 | ||||
-rw-r--r-- | lib/libsectok/sectok.c | 4 |
5 files changed, 14 insertions, 14 deletions
diff --git a/lib/libsectok/cmdtab.c b/lib/libsectok/cmdtab.c index e689cfb0c6e..de58055cd6e 100644 --- a/lib/libsectok/cmdtab.c +++ b/lib/libsectok/cmdtab.c @@ -1,4 +1,4 @@ -/* $Id: cmdtab.c,v 1.6 2001/08/02 17:02:05 rees Exp $ */ +/* $Id: cmdtab.c,v 1.7 2003/04/02 22:57:51 deraadt Exp $ */ /* copyright 1999 @@ -127,7 +127,7 @@ sectok_get_ins(int ins) break; if (!p->name) { - sprintf(name, "unknown ins %02x", ins); + snprintf(name, sizeof name, "unknown ins %02x", ins); return name; } 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; } diff --git a/lib/libsectok/sc7816.c b/lib/libsectok/sc7816.c index 076d9bdedaa..113d2763c09 100644 --- a/lib/libsectok/sc7816.c +++ b/lib/libsectok/sc7816.c @@ -1,4 +1,4 @@ -/* $Id: sc7816.c,v 1.8 2001/08/02 17:02:05 rees Exp $ */ +/* $Id: sc7816.c,v 1.9 2003/04/02 22:57:51 deraadt Exp $ */ /* copyright 2000 @@ -156,7 +156,7 @@ scwrite(int fd, int cla, int ins, int p1, int p2, int p3, unsigned char *buf, in scperf_buf = malloc (64); - sprintf (scperf_buf, "scwrite (ins %02x, p3 %02x) start", ins, p3); + snprintf (scperf_buf, 64, "scwrite (ins %02x, p3 %02x) start", ins, p3); SetTime(scperf_buf); #endif /* SCPERF */ rv = scrw(fd, cla, ins, p1, p2, p3, buf, 0, NULL, sw1p, sw2p); @@ -176,7 +176,7 @@ scread(int fd, int cla, int ins, int p1, int p2, int p3, unsigned char *buf, int scperf_buf = malloc (64); - sprintf (scperf_buf, "scread (ins %02x, p3 %02x) start", ins, p3); + snprintf (scperf_buf, 64, "scread (ins %02x, p3 %02x) start", ins, p3); SetTime(scperf_buf); #endif /* SCPERF */ rv = scrw(fd, cla, ins, p1, p2, 0, NULL, p3, buf, sw1p, sw2p); diff --git a/lib/libsectok/scio.c b/lib/libsectok/scio.c index b9352794752..96104ecd0d3 100644 --- a/lib/libsectok/scio.c +++ b/lib/libsectok/scio.c @@ -1,4 +1,4 @@ -/* $Id: scio.c,v 1.11 2002/01/02 20:18:32 deraadt Exp $ */ +/* $Id: scio.c,v 1.12 2003/04/02 22:57:51 deraadt Exp $ */ /* copyright 1997 @@ -100,9 +100,9 @@ todos_scopen(int ttyn, int flags, int *ep) #endif /* BYTECOUNT */ #ifdef __sun - sprintf(ttyname, ttynametmpl, 'a' + ttyn); + snprintf(ttyname, sizeof ttyname, ttynametmpl, 'a' + ttyn); #else - sprintf(ttyname, ttynametmpl, ttyn); + snprintf(ttyname, sizeof ttyname, ttynametmpl, ttyn); #endif diff --git a/lib/libsectok/sectok.c b/lib/libsectok/sectok.c index 36ba116f454..0c545b0ed14 100644 --- a/lib/libsectok/sectok.c +++ b/lib/libsectok/sectok.c @@ -1,4 +1,4 @@ -/* $Id: sectok.c,v 1.10 2001/08/02 17:02:05 rees Exp $ */ +/* $Id: sectok.c,v 1.11 2003/04/02 22:57:51 deraadt Exp $ */ /* copyright 2000 @@ -411,7 +411,7 @@ lookupSym(void *handle, char *name) #else char undername[32]; - sprintf(undername, "_%s", name); + snprintf(undername, sizeof undername, "_%s", name); return dlsym(handle, undername); #endif } |