[PATCH] Fix null pointer dereference in util/fdmon-epoll.c

2022-01-11 Thread Daniella Lee
in the condition is the return value of epoll_ctl function, and will return -1 when failed. Therefore, the patch added a check and initialized the variable "r". Signed-off-by: Daniella Lee --- util/fdmon-epoll.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --g

[PATCH] Fix bad overflow check in hw/pci/pcie.c

2021-11-25 Thread Daniella Lee
CE_SIZE); (gdb) n 932 assert(offset < offset + size); (gdb) p offset $1 = 256 (gdb) p offset < offset + size $2 = 1 (gdb) set offset=65533 (gdb) p offset < offset + size $3 = 1 (gdb) p offset < (uint16_t)(offset + size) $4 = 0 Signed-off-by: Daniella Lee --- hw/pci/pci

[PATCH] block vvfat.c fix leak when failure occurs

2021-11-19 Thread Daniella Lee
Signed-off-by: Daniella Lee --- block/vvfat.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c index 05e78e3c27..5dacc6cfac 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -1279,8 +1279,18 @@ static int vvfat_open(BlockDriverState

[PATCH] block/vvfat.c fix leak when failure occurs

2021-11-16 Thread Daniella Lee
../blockdev.c:608 #10 drive_new (all_opts=0x56d2b700, block_default_type=IF_IDE, errp=0x56c98c40 ) at ../blockdev.c:992 .. Signed-off-by: Daniella Lee --- block/vvfat.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/block/vvfat.c b/block/vvfat.c index 05e78e