Enabling warnings around format security
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -52,7 +52,7 @@ bool CImageASC::Save(const QString& fileName, const CFloatImage& image)
|
||||
}
|
||||
|
||||
// First print the file header
|
||||
fprintf(file, fileHeader.c_str());
|
||||
fprintf(file, "%s", fileHeader.c_str());
|
||||
|
||||
// Then print all the pixels.
|
||||
for (uint32 y = 0; y < height; y++)
|
||||
|
||||
@@ -103,7 +103,7 @@ bool CImageUtil::SavePGM(const QString& fileName, const CImageEx& image)
|
||||
}
|
||||
|
||||
// First print the file header
|
||||
fprintf(file, fileHeader.c_str());
|
||||
fprintf(file, "%s", fileHeader.c_str());
|
||||
|
||||
// Then print all the pixels.
|
||||
for (uint32 y = 0; y < height; y++)
|
||||
|
||||
@@ -78,7 +78,7 @@ bool CMemoryBlock::Allocate(int size, int uncompressedSize)
|
||||
{
|
||||
QString str;
|
||||
str = QStringLiteral("CMemoryBlock::Allocate failed to allocate %1Mb of Memory").arg(size / (1024 * 1024));
|
||||
CryLogAlways(str.toUtf8().data());
|
||||
CryLogAlways("%s", str.toUtf8().data());
|
||||
|
||||
QMessageBox::critical(QApplication::activeWindow(), QString(), str + QString("\r\nSandbox will try to reduce its working memory set to free memory for this allocation."));
|
||||
GetIEditor()->ReduceMemory();
|
||||
|
||||
Reference in New Issue
Block a user