[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/2] hw/timer/renesas_tmr: Fix use of uninitialized data
From: |
Peter Maydell |
Subject: |
[PATCH 0/2] hw/timer/renesas_tmr: Fix use of uninitialized data |
Date: |
Fri, 19 Feb 2021 22:32:38 +0000 |
This patchseries fixes a use-of-uninitialized-data spotted by Coverity
(CID 1429976).
Patch 1 just tweaks some constant names for values of the TCCR.CSS
register field, since patch 2 needs to add some more defines
for the other possible values of the field.
Patch 2 is the bugfix proper; the use-uninitialized happens if the
guest programs TCCR.CSS to values which are either prohibited in
the h/w datasheet, or valid but corresponding to behaviour not
currently implemented by QEMU. (Yes, I could have added LOG_UNIMP
and/or LOG_GUEST_ERROR when the TCCR is written by the guest; it
didn't really seem worth the effort to me.)
thanks
-- PMM
Peter Maydell (2):
hw/timer/renesas_tmr: Prefix constants for CSS values with CSS_
hw/timer/renesas_tmr: Fix use of uninitialized data in read_tcnt()
hw/timer/renesas_tmr.c | 33 ++++++++++++++++++++++-----------
1 file changed, 22 insertions(+), 11 deletions(-)
--
2.20.1
- [PATCH 0/2] hw/timer/renesas_tmr: Fix use of uninitialized data,
Peter Maydell <=