diff options
Diffstat (limited to 'generic/tclRegexp.c')
-rw-r--r-- | generic/tclRegexp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index bd923ba..3259b48 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); } |