Clang/GCC compiler settings update [SECURITY] (#7358)
- Add the following compilation flags for clang -fpie -fstack-protector-all -fstack-check (non-release) - Add the following compilation flags for gcc -fpie -fstack-protector-all - Fix -Wunused-result errors from above compilation flag updates - Add _FORTIFY_SOURCE=2 to GCC DEFINES Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com>
This commit is contained in:
@@ -143,7 +143,8 @@ bool CImageUtil::LoadPGM(const QString& fileName, CImageEx& image)
|
||||
fseek(file, 0, SEEK_SET);
|
||||
|
||||
char* str = new char[fileSize];
|
||||
fread(str, fileSize, 1, file);
|
||||
|
||||
[[maybe_unused]] auto bytesRead = fread(str, fileSize, 1, file);
|
||||
|
||||
[[maybe_unused]] char* nextToken = nullptr;
|
||||
token = azstrtok(str, 0, seps, &nextToken);
|
||||
|
||||
Reference in New Issue
Block a user