diff options
author | OBATA Akio <[email protected]> | 2020-07-25 11:48:24 +0900 |
---|---|---|
committer | OBATA Akio <[email protected]> | 2020-07-25 11:48:24 +0900 |
commit | e6ce806b771adc9d963d760dfac46b2c62a57798 (patch) | |
tree | 3dad7f37ac569b015236d5da828b201a3926a001 /qmake | |
parent | 5c270c3e26e74609a1821ddd3bb17566ccc53396 (diff) | |
download | tqt3-e6ce806b771adc9d963d760dfac46b2c62a57798.tar.gz tqt3-e6ce806b771adc9d963d760dfac46b2c62a57798.zip |
Fix potentially buffer overrun related to readlink(2)
Signed-off-by: OBATA Akio <[email protected]>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/project.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp index 0f8eca3f9..de57507e2 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -724,7 +724,7 @@ TQMakeProject::isActiveConfig(const TQString &x, bool regex, TQMap<TQString, TQS static char *buffer = NULL; if(!buffer) buffer = (char *)malloc(1024); - int l = readlink(Option::mkfile::qmakespec, buffer, 1024); + int l = readlink(Option::mkfile::qmakespec, buffer, 1023); if(l != -1) { buffer[l] = '\0'; TQString r = buffer; |