diff options
author | OBATA Akio <[email protected]> | 2020-07-25 11:48:24 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2020-07-25 15:44:41 +0900 |
commit | ed71e397ed3267d0d917e7e470c0702142947f5e (patch) | |
tree | a5d34e6c00081efd875d13768dc851ddf0d10a06 | |
parent | 4ed0a29d338d99971be9eaa9b41db41e02452c15 (diff) | |
download | tqt3-ed71e397ed3267d0d917e7e470c0702142947f5e.tar.gz tqt3-ed71e397ed3267d0d917e7e470c0702142947f5e.zip |
Fix potentially buffer overrun related to readlink(2)
Signed-off-by: OBATA Akio <[email protected]>
(cherry picked from commit e6ce806b771adc9d963d760dfac46b2c62a57798)
-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 f60dba06a..e15128109 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; |