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:20 +0100 |
commit | b9a6202ac9fadd5d69c4a92c870dc783581568da (patch) | |
tree | 697c453cd158d97de41c39ef7a068eaafd6d654e | |
parent | ae3d63aa838bc1812e5d1e2753857d7e097f4f02 (diff) | |
download | qt3-b9a6202ac9fadd5d69c4a92c870dc783581568da.tar.gz qt3-b9a6202ac9fadd5d69c4a92c870dc783581568da.zip |
Fix potentially buffer overrun related to readlink(2)
Signed-off-by: OBATA Akio <obache@wizdas.com>
(cherry picked from commit 5c32919647732d0e20dc08ad4a8d24193238174f)
-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 3957144..0508c31 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; |