QRhiVulkan: fix random values in pipelineCacheData() result
The QVkPipelineCacheDataHeader::reserved field wasn't initializaed by
the code, but then memcpy()ed with the struct into the result
QByteArray. At best, this contains random data, at worst, it leaks
information.
Initialize it to zero.
Found by Coverity.
Amends df0e98d408.
Pick-to: 6.7 6.6 6.5 6.2
Coverity-Id: 444147
Change-Id: I398c9a1e99483f2f9887d768319b20ecc11e2c86
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
bb10
parent
6aec89c5fb
commit
2913e7de51
|
|
@ -4724,6 +4724,7 @@ QByteArray QRhiVulkan::pipelineCacheData()
|
|||
header.deviceId = physDevProperties.deviceID;
|
||||
header.dataSize = quint32(dataSize);
|
||||
header.uuidSize = VK_UUID_SIZE;
|
||||
header.reserved = 0;
|
||||
memcpy(data.data(), &header, headerSize);
|
||||
memcpy(data.data() + headerSize, physDevProperties.pipelineCacheUUID, VK_UUID_SIZE);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue