summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixThrd.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-30 21:20:30 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-30 21:20:30 (GMT)
commit186145578675341deb63fd53e6080896695c3574 (patch)
tree4aa12b60fc6ad7ca4c19658d774dee4326ad165b /unix/tclUnixThrd.c
parent784535a35c779f46886fe9a880b706c979efdd77 (diff)
parent191fecdc87592dfea94718bc716551c72f072c33 (diff)
downloadtcl-186145578675341deb63fd53e6080896695c3574.zip
tcl-186145578675341deb63fd53e6080896695c3574.tar.gz
tcl-186145578675341deb63fd53e6080896695c3574.tar.bz2
Fix [0cb3554903]: macOS 13 SDK deprecates sprintf()
Diffstat (limited to 'unix/tclUnixThrd.c')
-rw-r--r--unix/tclUnixThrd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index afb795d..e4a3c68 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -667,7 +667,7 @@ TclpInetNtoa(
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
unsigned char *b = (unsigned char*) &addr.s_addr;
- sprintf(tsdPtr->nabuf, "%u.%u.%u.%u", b[0], b[1], b[2], b[3]);
+ snprintf(tsdPtr->nabuf, sizeof(tsdPtr->nabuf), "%u.%u.%u.%u", b[0], b[1], b[2], b[3]);
return tsdPtr->nabuf;
#else
return inet_ntoa(addr);