diff options
Diffstat (limited to 'src/tests/threads/t_rcache.c')
-rw-r--r-- | src/tests/threads/t_rcache.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tests/threads/t_rcache.c b/src/tests/threads/t_rcache.c index 5d817de..06f4d3b 100644 --- a/src/tests/threads/t_rcache.c +++ b/src/tests/threads/t_rcache.c @@ -58,12 +58,14 @@ static void try_one (struct tinfo *t) char buf[100], buf2[100]; krb5_rcache my_rcache; - sprintf(buf, "host/all-in-one.mit.edu/%p@ATHENA.MIT.EDU", buf); + snprintf(buf, sizeof(buf), "host/all-in-one.mit.edu/%p@ATHENA.MIT.EDU", + buf); r.server = buf; r.client = (t->my_cusec & 7) + "abcdefgh@ATHENA.MIT.EDU"; if (t->now != t->my_ctime) { if (t->my_ctime != 0) { - sprintf(buf2, "%3d: %ld %5d\n", t->idx, t->my_ctime, t->my_cusec); + snprintf(buf2, sizeof(buf2), "%3d: %ld %5d\n", t->idx, + t->my_ctime, t->my_cusec); printf("%s", buf2); } t->my_ctime = t->now; |