diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2019-04-12 13:16:26 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-05-07 09:55:07 +0200 |
commit | 94932c95c10400acd286fd768a6b411e7ebbec8f (patch) | |
tree | 6a366ba90b3556b8945ccc90ab4d2a4011c1cc0c /block/dmg.h | |
parent | dceb885255b8f7c79ab440ea242c9180bfaf4a84 (diff) |
qxl: avoid unaligned pointer reads/writes
The SPICE_RING_PROD_ITEM() macro is initializing a local
'uint64_t *' variable to point to the 'el' field inside
the QXLReleaseRing struct. This uint64_t field is not
guaranteed aligned as the struct is packed.
Code should not take the address of fields within a
packed struct. Changing the SPICE_RING_PROD_ITEM()
macro to avoid taking the address of the field is
impractical. It is clearer to just remove the macro
and inline its functionality in the three call sites
that need it.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20190412121626.19829-6-berrange@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'block/dmg.h')
0 files changed, 0 insertions, 0 deletions