diff options
author | Ulf Hermann <[email protected]> | 2024-05-16 15:53:23 +0200 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2024-05-17 17:34:33 +0200 |
commit | 9b784345795984878d2938d6903e7c87ae7f0778 (patch) | |
tree | 4487dfbde5b1f49a7969f5ddc7b7279c63ff54b9 /tools/qmlcachegen | |
parent | 6cd080a4143f61b83388fff4aede534d085b6db1 (diff) |
qmlcompiler: Sanitize qmldir paths before using them
They may contain backslashes.
Pick-to: 6.7 6.5
Fixes: QTBUG-125393
Change-Id: Ifd8c97c44b036ab64a221775a7fe6316445f6cf8
Reviewed-by: Friedemann Kleint <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
Diffstat (limited to 'tools/qmlcachegen')
-rw-r--r-- | tools/qmlcachegen/qmlcachegen.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/qmlcachegen/qmlcachegen.cpp b/tools/qmlcachegen/qmlcachegen.cpp index 1180931d9f..d16795f9d5 100644 --- a/tools/qmlcachegen/qmlcachegen.cpp +++ b/tools/qmlcachegen/qmlcachegen.cpp @@ -15,11 +15,12 @@ #include <QLoggingCategory> #include <private/qqmlirbuilder_p.h> -#include <private/qqmljsparser_p.h> +#include <private/qqmljscompiler_p.h> #include <private/qqmljslexer_p.h> -#include <private/qqmljsresourcefilemapper_p.h> #include <private/qqmljsloadergenerator_p.h> -#include <private/qqmljscompiler_p.h> +#include <private/qqmljsparser_p.h> +#include <private/qqmljsresourcefilemapper_p.h> +#include <private/qqmljsutils_p.h> #include <private/qresourcerelocater_p.h> #include <algorithm> @@ -257,7 +258,8 @@ int main(int argc, char **argv) logger.setSilent(true); QQmlJSAotCompiler cppCodeGen( - &importer, u':' + inputResourcePath, parser.values(importsOption), &logger); + &importer, u':' + inputResourcePath, + QQmlJSUtils::cleanPaths(parser.values(importsOption)), &logger); if (parser.isSet(validateBasicBlocksOption)) cppCodeGen.m_flags.setFlag(QQmlJSAotCompiler::ValidateBasicBlocks); |