hw/display/framebuffer.c: Avoid overflow for framebuffers > 4GB

Coverity points out that calculating src_len by multiplying
src_width by rows could overflow. This can only happen in
the implausible case of a framebuffer larger than 4GB, but
we may as well fix it, placating Coverity. (CID1005515)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
Peter Maydell 2017-01-09 16:45:09 +00:00 committed by Michael Tokarev
parent 1706e9d819
commit ba56e4cad4
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ void framebuffer_update_display(
i = *first_row;
*first_row = -1;
src_len = src_width * rows;
src_len = (hwaddr)src_width * rows;
mem = mem_section->mr;
if (!mem) {