summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin/qcoffpeparser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Mark qtbase/src/corelib/plugin files as security-criticalMagdalena Stojek2025-06-041-0/+1
| | | | | | | | | | | | | | | - quuid.cpp parses the string representation of a UUID - qfactoryloader.cpp parses metadata from loaded plugin - qcoffpeparser.cpp, qelfparser_p.cpp and qmachparser.cpp as they are binary object files parsers - qlibrary.cpp, qlibrary_unix.cpp, qlibrary_win.cpp, qpluginloader.cpp are responsible for finding and loading plugins from untrusted locations. Fixes: QTBUG-135193 Change-Id: Ibbcefeab80e7455225ade620bdba45dbc592c581 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
* Corelib: implement support for COFF-PE & DLLs in CYGWINCarlo Bramini2025-03-071-0/+3
| | | | | | | | Much of the code was already implemented for WIN32. The patch adds relevant code and implements few exceptions for CYGWIN. Change-Id: I0621075a8a989f64a4c2391d25220ef1686342d8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Straighten out various logging categoriesUlf Hermann2024-06-191-1/+1
| | | | | | | | | | | | Either make them static or declare them in a header. We want them to be static wherever possible, in order to reduce the number of visible symbols. If they can't be static, however, they should at least be declared in only one place. Task-number: QTBUG-67692 Change-Id: I6f3b596ed4f0adc9873dd0a5f54f055a991a6207 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove extra semi-colonsTasuku Suzuki2024-02-061-1/+1
| | | | | Change-Id: I92fddb36cd136fd1bd627955f15d0559b9942d7e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QPluginLoader: Fix the expected machine word for Windows on ARMMartin Storsjö2022-09-271-1/+1
| | | | | | | | | | | | This fixes loading plugins on Windows on ARM since 892d5607d0b1c9e010ea10a1123e68741c46c21e. IMAGE_FILE_MACHINE_ARM was used for older Windows targets on ARM, in particular Windows CE. Pick-to: 6.4 6.3 Change-Id: I61ef7a6b5920af9192c55209f2641a6c469ad1d2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Allow brace initialization for some of QLatin1StringView constructorsSona Kurazyan2022-04-011-1/+1
| | | | | | | | | | | | | | | Removed "explicit" keyword from constructors taking (const char *, qsizetype) and (const char *, const char *). Switched to using brace initialization for creating QLatin1StringView in QtCore. [ChangeLog][QtCore][QLatin1StringView] The (const char *, qsizetype) and (const char *, const char *) constructors are no longer explicit. Change-Id: I4f6760692e4df60fe4231e86a25f6ea03cd1bf82 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtCore: Replace remaining uses of QLatin1String with QLatin1StringViewSona Kurazyan2022-03-261-5/+5
| | | | | | | Task-number: QTBUG-98434 Change-Id: Ib7c5fc0aaca6ef33b93c7486e99502c555bf20bc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QtCore: replace QLatin1String/QLatin1Char with _L1/u'' where applicableSona Kurazyan2022-03-251-4/+5
| | | | | | | | | | | As a drive-by, did also minor refactorings/improvements. Task-number: QTBUG-98434 Change-Id: I81964176ae2f07ea63674c96f47f9c6aa046854f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
* QCoffPeParser: simplify std::optional checkMarc Mutz2022-02-011-1/+1
| | | | | | | | | | | | | | | | | | | Even in C++98 one could declare variables in if statements and contextually convert them to bool: if (D* d = dynamic_cast<D*>(base)) ~~~ else if (D2* d = dynamic_cast<D2*>(base)) ~~~ std::optional is contextually convertible to bool, so we don't need C++17 if initializers. Just use if (auto optional = ~~~~) Pick-to: 6.3 Change-Id: Ie64c2c1ceb7b608eda0534d837f46d3c4be49bf8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Q*Parser: Replace "data" with "contents" in stringsRobert Löhning2022-01-121-1/+1
| | | | | | | | | ...to be clearer and avoid confusion with "data section". Change-Id: I13319be0e3e12aecf1e0e86c256007dfe6cb98c6 Pick-to: 6.3 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QCoffParser: Replace windows.h with qt_windows.hYuhang Zhao2021-12-091-4/+1
| | | | | Change-Id: I9aeeb2cef4d068020e0c176a70ad86c9e28b0e68 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Q{CoffPe,Elf,MachO}Parser: check that the magic string is presentThiago Macieira2021-11-191-3/+8
| | | | | | | | | | Commit 2549a88ba2a48fa2bedce97dd71a2974c6f8840a changed the ELF and Mach-O parsers to return an offset to the actual data header, not the magic string, which we stopped searching for anyway. This commit brings such a validity check back and adds it to the new COFF PE parser. Change-Id: Iccb47e5527544b6fbd75fffd16b8b2252a76f179 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QPluginLoader: add COFF PE file parserThiago Macieira2021-11-191-0/+416
Fixes: QTBUG-67461 Docs: https://docs.microsoft.com/en-us/windows/win32/debug/pe-format Change-Id: I5e52dc5b093c43a3b678fffd16b77bf9a8f2b17e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>