diff options
| author | Markus Armbruster <armbru@redhat.com> | 2020-04-22 15:07:09 +0200 |
|---|---|---|
| committer | Markus Armbruster <armbru@redhat.com> | 2020-04-29 08:01:52 +0200 |
| commit | 9ec374a781c34daa6e70fcd885ef30e090cc2384 (patch) | |
| tree | ab9586712a191596b64f3dbdc07816cd7e1b3f4b /hw/net/virtio-net.c | |
| parent | abc9bf69a66a11499a801ff545b8fe7adbb3a04c (diff) | |
| download | focaccia-qemu-9ec374a781c34daa6e70fcd885ef30e090cc2384.tar.gz focaccia-qemu-9ec374a781c34daa6e70fcd885ef30e090cc2384.zip | |
cpus: Proper range-checking for -icount shift=N
timers_state.icount_time_shift must be in [0,63] to avoid undefined behavior when shifting by it, e.g. in cpu_icount_to_ns(). icount_adjust() clamps it to [0,MAX_ICOUNT_SHIFT], with MAX_ICOUNT_SHIFT = 10. configure_icount() doesn't. Fix that. Fixes: a8bfac37085c3372366d722f131a7e18d664ee4d Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20200422130719.28225-5-armbru@redhat.com>
Diffstat (limited to 'hw/net/virtio-net.c')
0 files changed, 0 insertions, 0 deletions