aspeed: check for negative values returned by blk_getlength()
commit0c7209bee805bcc974cf16cd567c8865db5d1ce5
authorCédric Le Goater <clg@kaod.org>
Fri, 10 Feb 2017 17:40:29 +0000 (10 17:40 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 10 Feb 2017 17:40:29 +0000 (10 17:40 +0000)
treecefa91d60d5c90a58700b805cab945b0beabcea4
parent14efdb5cb3540d5ada51b81b70ec18ce95ae1642
aspeed: check for negative values returned by blk_getlength()

write_boot_rom() does not check for negative values. This is more a
problem for coverity than the actual code as the size of the flash
device is checked when the m25p80 object is created. If there is
anything wrong with the backing file, we should not even reach that
path.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-id: 1486648058-520-2-git-send-email-clg@kaod.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/aspeed.c