diff options
| author | Prasad J Pandit <pjp@fedoraproject.org> | 2016-11-07 10:00:24 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2016-11-07 10:00:24 +0000 |
| commit | 6e29651c5e3a0e0336818574f273b3f6ecea491d (patch) | |
| tree | cac5e9d74f007697377fab6d54e6fbe0f2267d82 /hw/i2c/bitbang_i2c.c | |
| parent | 9226682a401f34b10fd79dfe17ba334da0800747 (diff) | |
| download | focaccia-qemu-6e29651c5e3a0e0336818574f273b3f6ecea491d.tar.gz focaccia-qemu-6e29651c5e3a0e0336818574f273b3f6ecea491d.zip | |
char: cadence: check baud rate generator and divider values
The Cadence UART device emulator calculates speed by dividing the baud rate by a 'baud rate generator' & 'baud rate divider' value. The device specification defines these register values to be non-zero and within certain limits. Add checks for these limits to avoid errors like divide by zero. Reported-by: Huawei PSIRT <psirt@huawei.com> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Message-id: 1477596278-1470-1-git-send-email-ppandit@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/i2c/bitbang_i2c.c')
0 files changed, 0 insertions, 0 deletions