summaryrefslogtreecommitdiff
path: root/cmd/mpitests/mpi-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/mpitests/mpi-test.c')
-rw-r--r--cmd/mpitests/mpi-test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/mpitests/mpi-test.c b/cmd/mpitests/mpi-test.c
index 80c0f951a..cc045a17c 100644
--- a/cmd/mpitests/mpi-test.c
+++ b/cmd/mpitests/mpi-test.c
@@ -958,7 +958,7 @@ test_div_d(void)
++err;
}
- sprintf(g_intbuf, ZS_DIGIT_FMT, r);
+ snprintf(g_intbuf, sizeof(g_intbuf), ZS_DIGIT_FMT, r);
if (strcmp(g_intbuf, r_mp3d6) != 0) {
reason("error: computed r = %s, expected %s\n", g_intbuf, r_mp3d6);
@@ -974,7 +974,7 @@ test_div_d(void)
++err;
}
- sprintf(g_intbuf, ZS_DIGIT_FMT, r);
+ snprintf(g_intbuf, sizeof(g_intbuf), ZS_DIGIT_FMT, r);
if (strcmp(g_intbuf, r_mp9c16) != 0) {
reason("error: computed r = %s, expected %s\n", g_intbuf, r_mp9c16);
@@ -1192,7 +1192,7 @@ test_mod_d(void)
mp_init(&a);
mp_read_radix(&a, mp5, 16);
IFOK(mp_mod_d(&a, md5, &r));
- sprintf(g_intbuf, ZS_DIGIT_FMT, r);
+ snprintf(g_intbuf, sizeof(g_intbuf), ZS_DIGIT_FMT, r);
mp_clear(&a);
if (strcmp(g_intbuf, r_mp5d5) != 0) {