summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-30 22:02:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-30 22:02:55 (GMT)
commitdc5930bc812a27e31bf8a0aa2fcf564ed7306a26 (patch)
treecfdd8df6ed6eeb844e46e1d630692a8a6137fbb9 /generic/tclBasic.c
parentf8b9e919c954be237c906a708530111607f88081 (diff)
parent186145578675341deb63fd53e6080896695c3574 (diff)
downloadtcl-dc5930bc812a27e31bf8a0aa2fcf564ed7306a26.zip
tcl-dc5930bc812a27e31bf8a0aa2fcf564ed7306a26.tar.gz
tcl-dc5930bc812a27e31bf8a0aa2fcf564ed7306a26.tar.bz2
Merge 8.6
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index b10a338..616600f 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -1533,7 +1533,7 @@ Tcl_CallWhenDeleted(
AssocData *dPtr = (AssocData *)ckalloc(sizeof(AssocData));
Tcl_HashEntry *hPtr;
- sprintf(buffer, "Assoc Data Key #%d", *assocDataCounterPtr);
+ snprintf(buffer, sizeof(buffer), "Assoc Data Key #%d", *assocDataCounterPtr);
(*assocDataCounterPtr)++;
if (iPtr->assocData == NULL) {
@@ -6891,7 +6891,7 @@ ProcessUnexpectedResult(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"command returned bad code: %d", returnCode));
}
- sprintf(buf, "%d", returnCode);
+ snprintf(buf, sizeof(buf), "%d", returnCode);
Tcl_SetErrorCode(interp, "TCL", "UNEXPECTED_RESULT_CODE", buf, NULL);
}