qemu/hw/ide
Stefan Weil 1e53537fda ide: Fix error messages from static code analysis (no real error)
Report from smatch:
hw/ide/core.c:1472 ide_exec_cmd(423) error: buffer overflow 'smart_attributes' 8 <= 29
hw/ide/core.c:1474 ide_exec_cmd(425) error: buffer overflow 'smart_attributes' 8 <= 29
hw/ide/core.c:1475 ide_exec_cmd(426) error: buffer overflow 'smart_attributes' 8 <= 29
...

The upper limit of 30 was never reached because both for loops terminated
when 'smart_attributes' reached end of list, so there was no real buffer
overflow.

Nevertheless, changing the code not only fixes the error report, but also
reduces the size of smart_attributes and simplifies the for loops.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-09-12 15:50:09 +02:00
..
ahci.c ahci: Fix sglist memleak in ahci_dma_rw_buf() 2012-08-10 10:25:12 +02:00
ahci.h ide/ahci: Use universal DMA helper functions 2012-06-27 16:33:25 -05:00
atapi.c ATAPI: STARTSTOPUNIT only eject/load media if powercondition is 0 2012-09-12 15:50:09 +02:00
cmd646.c Revert "fix some debug printf format strings" 2012-08-27 18:33:24 +04:00
core.c ide: Fix error messages from static code analysis (no real error) 2012-09-12 15:50:09 +02:00
ich.c Merge branch pci into master 2012-07-29 17:05:35 +03:00
internal.h ahci: Fix ahci cdrom read corruptions for reads > 128k 2012-08-10 10:25:12 +02:00
isa.c qom: Unify type registration 2012-02-15 09:39:21 -06:00
macio.c iommu: Make sglists and dma_bdrv helpers use new universal DMA helpers 2012-06-27 16:33:25 -05:00
Makefile.objs build: convert libhw to nested Makefile.objs 2012-06-07 09:21:17 +02:00
microdrive.c
mmio.c
pci.c ide: fix compilation errors when DEBUG_IDE is set 2012-02-10 10:44:52 +00:00
pci.h
piix.c Merge branch pci into master 2012-07-29 17:05:35 +03:00
qdev.c ide scsi: Mess with geometry only for hard disk devices 2012-08-06 22:39:14 +02:00
via.c Revert "fix some debug printf format strings" 2012-08-27 18:33:24 +04:00