summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qdir/qdir.pro
diff options
context:
space:
mode:
authorAndre de la Rocha <andre.rocha@qt.io>2018-01-18 18:43:25 +0100
committerAndre de la Rocha <andre.rocha@qt.io>2018-01-19 14:10:53 +0000
commite211ab76d766878b4dbe88901b9a7a4a70ce7332 (patch)
tree14c0a863842a47c436b02b8132b8b13fdb95d2aa /tests/auto/corelib/io/qdir/qdir.pro
parentdc742e9394c2796acce1317af7bb9fc304f820a8 (diff)
Handle OOM condition in the validation of plugin metadata
A large plugin dll (e.g., one with many MB of debug info) could cause a 32-bit application to crash when the entire dll file could not fit within the address space of the process. The code for validating a plugin library and retrieving metadata from it first tried to map the entire file in memory, which failed for large files, returning NULL. In this case, the code tried then to read the entire file via QFile::readAll(), which deep below caused a bad_alloc exception in malloc, resulting in the termination of the application. This change handles the case where the library could not be mapped into memory, in spite of memory mapping being supported, by reporting the error and returning false, making the plugin unavailable. [ChangeLog][QtCore][QPluginLoader] Fixed a bug that would cause the Qt plugin scanning system to allocate too much memory and possibly crash the process. Task-number: QTBUG-65197 Change-Id: I8c7235d86175c9fcd2b87fcb1151570da9b9ebe3 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'tests/auto/corelib/io/qdir/qdir.pro')
0 files changed, 0 insertions, 0 deletions