diff options
author | OBATA Akio <obache@wizdas.com> | 2020-07-25 11:48:24 +0900 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-02-02 01:42:17 +0100 |
commit | 6da58c88045502a19f7f5ea54fca0bf079afff26 (patch) | |
tree | 0ff67ea44f75f909f8c03d72744004db2e1978b0 /qmake/project.cpp | |
parent | ccb28f09f42d22eea45ed25f791cdc8c71d751f5 (diff) | |
download | qt3-6da58c88045502a19f7f5ea54fca0bf079afff26.tar.gz qt3-6da58c88045502a19f7f5ea54fca0bf079afff26.zip |
Fix potentially buffer overrun related to readlink(2)
Signed-off-by: OBATA Akio <obache@wizdas.com>
(cherry picked from commit 5c32919647732d0e20dc08ad4a8d24193238174f)
Diffstat (limited to 'qmake/project.cpp')
-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 efc465d..081143c 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -724,7 +724,7 @@ QMakeProject::isActiveConfig(const QString &x, bool regex, QMap<QString, QString 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'; QString r = buffer; |