Philippe Mathieu-Daudé 2a4e2e4919 loader: check get_image_size() return value
since a negative value means it errored.

hw/core/loader.c:149:9: warning: Loss of sign in implicit conversion
    if (size > max_sz) {
        ^~~~
hw/core/loader.c:171:9: warning: Loss of sign in implicit conversion
    if (size > memory_region_size(mr)) {
        ^~~~

Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-07-31 13:06:38 +03:00
..
2016-10-04 13:28:07 +01:00
2017-06-02 11:33:53 +04:00
2017-07-27 14:23:33 +02:00
2017-07-14 12:16:09 +01:00
2017-06-02 14:07:53 +01:00
2017-07-19 13:43:58 +01:00
2017-07-28 12:35:40 +02:00
2017-07-14 12:29:49 +02:00
2016-05-18 15:04:27 +03:00
2017-01-27 18:07:59 +01:00
2017-07-14 12:04:43 +02:00
2017-07-17 20:13:56 +08:00
2016-01-29 15:07:25 +00:00
2017-06-27 15:09:15 +02:00
2016-10-28 18:17:24 +03:00
2017-07-20 10:02:11 +02:00
2017-07-26 11:38:18 -06:00