Commit 26fbeecf authored by Giuseppe D'Angelo's avatar Giuseppe D'Angelo Committed by Oswald Buddenhagen
Browse files

Initialize QFileSystemMetaData::size_ data member


There's a code path which reads that member before it got anything
assigned to it, triggering undefined behavior.

The code path goes as follows:

1. an instance is created in QFSFileEngineIterator::advance
2. the instance is passed to QFileSystemIterator::advance, which fills in
   only some members (not size_)
3. the instance is passed to QFileInfoPrivate which does a deep copy,
   reading an uninitialized size_

Change-Id: I6835ee701a83b63ca4bad6235feeb6a23566fcd3
Reviewed-by: default avatarMarc Mutz <marc.mutz@kdab.com>
Reviewed-by: default avatarThiago Macieira <thiago.macieira@intel.com>
parent ec68f67e
Showing with 2 additions and 1 deletion
Supports Markdown
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