diff options
| author | Roman Penyaev <r.peniaev@gmail.com> | 2024-11-29 11:32:38 +0100 |
|---|---|---|
| committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2024-12-02 16:23:12 +0400 |
| commit | 188df56eab8ed960e407762e31a35fc666355132 (patch) | |
| tree | e25ef3d7bfdd86e1b44c648070d8043233fb034d /include/hw/boards.h | |
| parent | 72b88908d12ee9347d13539c7dd9a252625158d1 (diff) | |
| download | focaccia-qemu-188df56eab8ed960e407762e31a35fc666355132.tar.gz focaccia-qemu-188df56eab8ed960e407762e31a35fc666355132.zip | |
chardev/char-mux: shift unsigned long to avoid 32-bit overflow
Allthough the size of MAX_MUX is equal to 4 and likely will never change, this patch changes type of constant to unsigned long to be on the safe side. Also add a static compile check that MAX_MUX never bigger than `sizeof(d->mux_bitset) * BITS_PER_BYTE`. Signed-off-by: Roman Penyaev <r.peniaev@gmail.com> Reviewed-by: "Marc-André Lureau" <marcandre.lureau@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com> Cc: qemu-devel@nongnu.org Message-ID: <20241129103239.464061-2-r.peniaev@gmail.com>
Diffstat (limited to 'include/hw/boards.h')
0 files changed, 0 insertions, 0 deletions