[PATCH 0/7] block: Miscellaneous minor Coverity fixes

Peter Maydell posted 7 patches 3 months, 3 weeks ago
There is a newer version of this series
block/gluster.c         |  6 +-----
block/ssh.c             | 10 ++++++----
block/vdi.c             |  2 +-
hw/block/fdc-isa.c      |  2 ++
hw/block/pflash_cfi01.c |  1 +
hw/ide/atapi.c          |  2 +-
hw/ide/pci.c            |  4 ----
7 files changed, 12 insertions(+), 15 deletions(-)
[PATCH 0/7] block: Miscellaneous minor Coverity fixes
Posted by Peter Maydell 3 months, 3 weeks ago
This patchset is a collection of fixes for minor Coverity reported
issues. In all cases, there isn't a user-visible problem, but
the Coverity issue pointed up somewhere where we could clean
up the code or make it a bit more obvious to a human reader
what the intent was.

Only lightly tested (with "make check" and "make check-avocado").

thanks
-- PMM

Peter Maydell (7):
  block/vdi.c: Avoid potential overflow when calculating size of write
  block/gluster: Use g_autofree for string in qemu_gluster_parse_json()
  hw/block/pflash_cfi01: Don't decrement pfl->counter below 0
  hw/ide/atapi: Be explicit that assigning to s->lcyl truncates
  hw/block/fdc-isa: Assert that isa_fdc_get_drive_max_chs() found
    something
  hw/ide/pci.c: Remove dead code from bmdma_prepare_buf()
  block/ssh.c: Don't double-check that characters are hex digits

 block/gluster.c         |  6 +-----
 block/ssh.c             | 10 ++++++----
 block/vdi.c             |  2 +-
 hw/block/fdc-isa.c      |  2 ++
 hw/block/pflash_cfi01.c |  1 +
 hw/ide/atapi.c          |  2 +-
 hw/ide/pci.c            |  4 ----
 7 files changed, 12 insertions(+), 15 deletions(-)

-- 
2.34.1
Re: [PATCH 0/7] block: Miscellaneous minor Coverity fixes
Posted by Philippe Mathieu-Daudé 3 months, 2 weeks ago
On 31/7/24 16:36, Peter Maydell wrote:

>    hw/block/pflash_cfi01: Don't decrement pfl->counter below 0
>    hw/ide/atapi: Be explicit that assigning to s->lcyl truncates
>    hw/block/fdc-isa: Assert that isa_fdc_get_drive_max_chs() found
>      something

Patches 3-5 queued, thanks.
Re: [PATCH 0/7] block: Miscellaneous minor Coverity fixes
Posted by Philippe Mathieu-Daudé 3 months, 2 weeks ago
On 31/7/24 16:36, Peter Maydell wrote:

> Peter Maydell (7):
>    hw/block/pflash_cfi01: Don't decrement pfl->counter below 0
>    hw/ide/atapi: Be explicit that assigning to s->lcyl truncates
>    hw/block/fdc-isa: Assert that isa_fdc_get_drive_max_chs() found
>      something
>    hw/ide/pci.c: Remove dead code from bmdma_prepare_buf()

Patches 3-5 queued, thanks.