Source: Replace most calls to sprintf with snprintf

This commit is contained in:
Sean McBride
2021-10-21 12:35:57 -04:00
parent 0ce50dd78f
commit 5ba6e8ac59
32 changed files with 95 additions and 76 deletions
+2 -1
View File
@@ -136,7 +136,8 @@ void cmGeneratedFileStreamBase::Open(std::string const& name)
this->TempName += this->TempExt;
} else {
char buf[64];
sprintf(buf, "tmp%05x", cmSystemTools::RandomSeed() & 0xFFFFF);
snprintf(buf, sizeof(buf), "tmp%05x",
cmSystemTools::RandomSeed() & 0xFFFFF);
this->TempName += buf;
}