mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-06 22:47:41 -07:00
clang's sanitizer is picky: memset(NULL, x, 0) is technically
undefined behavior, even though no sane implementation of memset()
deferences the NULL. Caught by the nbd-qemu-allocation iotest.
The alternative to checking before each memset is to instead force an
allocation of 1 element instead of g_new0(type, 0)'s behavior of
returning NULL for a 0-length array.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Fixes:
|
||
|---|---|---|
| .. | ||
| client-connection.c | ||
| client.c | ||
| common.c | ||
| meson.build | ||
| nbd-internal.h | ||
| server.c | ||
| trace-events | ||
| trace.h | ||