summaryrefslogtreecommitdiffstats
path: root/generic/tclRegexp.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclRegexp.c')
-rw-r--r--generic/tclRegexp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c
index bb4ffc9..8e0681c 100644
--- a/generic/tclRegexp.c
+++ b/generic/tclRegexp.c
@@ -729,7 +729,7 @@ TclRegError(
p = (n > sizeof(buf)) ? "..." : "";
Tcl_SetObjResult(interp, Tcl_ObjPrintf("%s%s%s", msg, buf, p));
- sprintf(cbuf, "%d", status);
+ snprintf(cbuf, sizeof(cbuf), "%d", status);
(void) TclReError(REG_ITOA, cbuf, sizeof(cbuf));
Tcl_SetErrorCode(interp, "REGEXP", cbuf, buf, NULL);
}