Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
5.9.1
-
None
-
Windows 7 x64
-
b7bcd03d194495f3e7230e0cd757b04641c633d9
Description
At least on Windows, it appears that the resulting shared memory segment created by `QSharedMemory::create` can be larger than the requested size due to alignment, and `QSharedMemory::size` returns the actual size of the shared memory segment instead of the requested size.
However, this is not stated in the documentation at all.
Users could have the false assumption that `QSharedMemory::size` returns the requested size and use it with functions like `memcpy` with another buffer, leading to buffer overflow.