diff options
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r-- | generic/tclEncoding.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 5c240e3..f8f4bf4 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -1288,7 +1288,7 @@ Tcl_ExternalToUtfDStringEx( /* Caller wants error message on failure */ if (result != TCL_OK && interp != NULL) { char buf[TCL_INTEGER_SPACE]; - sprintf(buf, "%" TCL_Z_MODIFIER "u", nBytesProcessed); + snprintf(buf, sizeof(buf), "%" TCL_Z_MODIFIER "u", nBytesProcessed); Tcl_SetObjResult( interp, Tcl_ObjPrintf("unexpected byte sequence starting at index %" @@ -1617,7 +1617,7 @@ Tcl_UtfToExternalDStringEx( int ucs4; char buf[TCL_INTEGER_SPACE]; TclUtfToUCS4(&srcStart[nBytesProcessed], &ucs4); - sprintf(buf, "%" TCL_Z_MODIFIER "u", nBytesProcessed); + snprintf(buf, sizeof(buf), "%" TCL_Z_MODIFIER "u", nBytesProcessed); Tcl_SetObjResult( interp, Tcl_ObjPrintf( |