summaryrefslogtreecommitdiffstats
path: root/byterun/printexc.c
diff options
context:
space:
mode:
Diffstat (limited to 'byterun/printexc.c')
-rw-r--r--byterun/printexc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/byterun/printexc.c b/byterun/printexc.c
index 6e70d524c..8f6badd92 100644
--- a/byterun/printexc.c
+++ b/byterun/printexc.c
@@ -71,7 +71,8 @@ CAMLexport char * caml_format_exception(value exn)
if (i > start) add_string(&buf, ", ");
v = Field(bucket, i);
if (Is_long(v)) {
- sprintf(intbuf, "%" ARCH_INTNAT_PRINTF_FORMAT "d", Long_val(v));
+ snprintf(intbuf, sizeof(intbuf),
+ "%" ARCH_INTNAT_PRINTF_FORMAT "d", Long_val(v));
add_string(&buf, intbuf);
} else if (Tag_val(v) == String_tag) {
add_char(&buf, '"');