summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2020-07-25 11:48:24 +0900
committerOBATA Akio <obache@wizdas.com>2020-07-25 11:48:24 +0900
commite6ce806b771adc9d963d760dfac46b2c62a57798 (patch)
tree3dad7f37ac569b015236d5da828b201a3926a001 /qmake
parent5c270c3e26e74609a1821ddd3bb17566ccc53396 (diff)
downloadtqt3-e6ce806b771adc9d963d760dfac46b2c62a57798.tar.gz
tqt3-e6ce806b771adc9d963d760dfac46b2c62a57798.zip
Fix potentially buffer overrun related to readlink(2)
Signed-off-by: OBATA Akio <obache@wizdas.com>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/project.cpp2
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;