Revision 1229e46d3cfe61ee0b11f08fbbc7530af1578637 authored by Peter Maydell on 16 October 2018, 17:09:38 UTC, committed by Kevin Wolf on 05 November 2018, 14:09:54 UTC
Taking the address of a field in a packed struct is a bad idea, because it might not be actually aligned enough for that pointer type (and thus cause a crash on dereference on some host architectures). Newer versions of clang warn about this. Avoid the bug by not using the "modify in place" byte swapping functions. There are a few places where the in-place swap function is used on something other than a packed struct field; we convert those anyway, for consistency. Patch produced with scripts/coccinelle/inplace-byteswaps.cocci. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
1 parent c317b64
File | Mode | Size |
---|---|---|
installer | ||
vss-win32 | ||
Makefile.objs | -rw-r--r-- | 448 bytes |
channel-posix.c | -rw-r--r-- | 8.3 KB |
channel-win32.c | -rw-r--r-- | 10.0 KB |
channel.h | -rw-r--r-- | 964 bytes |
commands-posix.c | -rw-r--r-- | 81.4 KB |
commands-win32.c | -rw-r--r-- | 63.9 KB |
commands.c | -rw-r--r-- | 15.1 KB |
guest-agent-command-state.c | -rw-r--r-- | 1.7 KB |
guest-agent-core.h | -rw-r--r-- | 1.5 KB |
main.c | -rw-r--r-- | 45.4 KB |
qapi-schema.json | -rw-r--r-- | 34.0 KB |
service-win32.c | -rw-r--r-- | 5.5 KB |
service-win32.h | -rw-r--r-- | 1.0 KB |
vss-win32.c | -rw-r--r-- | 4.5 KB |
vss-win32.h | -rw-r--r-- | 673 bytes |
Computing file changes ...