summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 335ebbe..694eb0f 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -671,7 +671,7 @@ void cmFindPackageCommand::SetVersionVariables(
addDefinition(prefix, version);
char buf[64];
- sprintf(buf, "%u", major);
+ snprintf(buf, sizeof(buf), "%u", major);
addDefinition(prefix + "_MAJOR", buf);
sprintf(buf, "%u", minor);
addDefinition(prefix + "_MINOR", buf);