summaryrefslogtreecommitdiff
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2021-10-21 12:35:57 -0400
committerSean McBride <sean@rogue-research.com>2021-10-25 18:23:13 -0400
commit5ba6e8ac59333aa574d5963332e3ef0f4c4d3514 (patch)
treed796f695e10d5ec20508cb04f4c8b3c2a6c0d742 /Source/cmMakefile.cxx
parent0ce50dd78f68b697e1ab29d52d733b87c5bfb67d (diff)
downloadcmake-5ba6e8ac59333aa574d5963332e3ef0f4c4d3514.tar.gz
Source: Replace most calls to sprintf with snprintf
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 23b97ed789..bf3e217352 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -134,8 +134,8 @@ cmDirectoryId cmMakefile::GetDirectoryId() const
// If we ever need to expose this to CMake language code we should
// add a read-only property in cmMakefile::GetProperty.
char buf[32];
- sprintf(buf, "(%p)",
- static_cast<void const*>(this)); // cast avoids format warning
+ snprintf(buf, sizeof(buf), "(%p)",
+ static_cast<void const*>(this)); // cast avoids format warning
return std::string(buf);
}