[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] Unchecked blk_getlength() in device models
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [Qemu-block] Unchecked blk_getlength() in device models and board code |
Date: |
Tue, 8 Aug 2017 13:04:21 +0100 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
On Fri, Aug 04, 2017 at 04:01:18PM +0200, Markus Armbruster wrote:
> blk_getlength() can fail. I figure the following need fixing:
>
> hw/arm/musicpal.c: musicpal_init()
Seems okay:
flash_size = blk_getlength(blk);
if (flash_size != 8*1024*1024 && flash_size != 16*1024*1024 &&
flash_size != 32*1024*1024) {
fprintf(stderr, "Invalid flash image size\n");
exit(1);
}
> hw/block/virtio-blk.c: virtio_blk_update_config()
Will send a fix.
signature.asc
Description: PGP signature