summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
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 9b1b5a5..1d78e7e 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -1499,7 +1499,7 @@ Tcl_CallWhenDeleted(
AssocData *dPtr = (AssocData *)Tcl_Alloc(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) {
@@ -6369,7 +6369,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);
}