Commit e1cee308 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen

fix raw data leak in $$absolute_path()

when the file name is empty, the path will be returned verbatim. this
must be considered when constructing the return value.

Task-number: QTBUG-54550
Change-Id: Ie108ed52275e66a154ef63bd6f7193f55b3e0454
Reviewed-by: Joerg Bornemann's avatarJoerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from qtbase/3c8134958c66f40bb86588aa91b83bf58b5de0c9)
Reviewed-by: Jake Petroules's avatarJake Petroules <jake.petroules@qt.io>
parent bb1ce1cd
......@@ -1021,7 +1021,11 @@ ProStringList QMakeEvaluator::evaluateBuiltinExpand(
QString rstr = QDir::cleanPath(
QDir(args.count() > 1 ? args.at(1).toQString(m_tmp2) : currentDirectory())
.absoluteFilePath(args.at(0).toQString(m_tmp1)));
ret << (rstr.isSharedWith(m_tmp1) ? args.at(0) : ProString(rstr).setSource(args.at(0)));
ret << (rstr.isSharedWith(m_tmp1)
? args.at(0)
: args.count() > 1 && rstr.isSharedWith(m_tmp2)
? args.at(1)
: ProString(rstr).setSource(args.at(0)));
}
break;
case E_RELATIVE_PATH:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment