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 07beffd..35f6334 100644
--- a/generic/tclRegexp.c
+++ b/generic/tclRegexp.c
@@ -730,7 +730,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);
}