|
From: | Markus Armbruster |
Subject: | [Qemu-devel] Is blk_getlength() in find_image_format() and img_map() kosher? |
Date: | Fri, 04 Aug 2017 15:55:39 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Have a look at find_image_format(): if (blk_is_sg(file) || !blk_is_inserted(file) || blk_getlength(file) == 0) { *pdrv = &bdrv_raw; return ret; } blk_getlength() can fail. Shouldn't we error out then? We pretty obviously should in img_map(): length = blk_getlength(blk); while (curr.start + curr.length < length) { Since I have to touch @length in the series I'm working on, I'll stick in a fix.
[Prev in Thread] | Current Thread | [Next in Thread] |