summaryrefslogtreecommitdiff
path: root/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-26 16:12:18 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-09-26 16:12:18 +0200
commit2ffd4e4f1af16b17a286ff354603a717f5d828a5 (patch)
tree99e2d4a7e2fde8e3abb027eb687901440750ee00 /src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
parent53d9614adbb728fc4db983c9bb817c6eea870994 (diff)
Replace all calls to sprintf() by calls to snprintf().
Diffstat (limited to 'src/drivers/Darwin/Fl_Darwin_System_Driver.cxx')
-rw-r--r--src/drivers/Darwin/Fl_Darwin_System_Driver.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx b/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
index 2c4c5a34b..bda6667e8 100644
--- a/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
+++ b/src/drivers/Darwin/Fl_Darwin_System_Driver.cxx
@@ -268,7 +268,7 @@ void Fl_Darwin_System_Driver::newUUID(char *uuidBuffer)
{
CFUUIDRef theUUID = CFUUIDCreate(NULL);
CFUUIDBytes b = CFUUIDGetUUIDBytes(theUUID);
- sprintf(uuidBuffer, "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",
+ snprintf(uuidBuffer, 36+1, "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",
b.byte0, b.byte1, b.byte2, b.byte3, b.byte4, b.byte5, b.byte6, b.byte7,
b.byte8, b.byte9, b.byte10, b.byte11, b.byte12, b.byte13, b.byte14, b.byte15);
CFRelease(theUUID);