summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-30 22:22:32 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-30 22:22:32 (GMT)
commitfeac96c8b3c738ef7cb8e3e89e076aa4f23f13b0 (patch)
tree196f438c5ba746829c249ad28e10c94a4a44ee0c /generic/tclEncoding.c
parent67ced520761d9c2dff0022dafbebdb996e20b551 (diff)
parented24f448c79bc5af4c0f6fd77826a6552271dd9c (diff)
downloadtcl-feac96c8b3c738ef7cb8e3e89e076aa4f23f13b0.zip
tcl-feac96c8b3c738ef7cb8e3e89e076aa4f23f13b0.tar.gz
tcl-feac96c8b3c738ef7cb8e3e89e076aa4f23f13b0.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index a87eb7f..2a96383 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -1299,7 +1299,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 %"
@@ -1630,7 +1630,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(