mirror of
https://git.proxmox.com/git/qemu
synced 2025-10-29 08:39:57 +00:00
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> |
||
|---|---|---|
| .. | ||
| ahci.c | ||
| ahci.h | ||
| atapi.c | ||
| cmd646.c | ||
| core.c | ||
| ich.c | ||
| internal.h | ||
| isa.c | ||
| macio.c | ||
| Makefile.objs | ||
| microdrive.c | ||
| mmio.c | ||
| pci.c | ||
| pci.h | ||
| piix.c | ||
| qdev.c | ||
| via.c | ||