mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-19 22:03:10 +00:00
server/red_parse_qxl: disallow zero area bitmaps
prevents division by zero later (SIGFPE, Arithmetic exception) in spice-common code, at spice-common/common/canvas_base.c:646 for both client and server (server only upon rendering).
This commit is contained in:
parent
341d273bad
commit
827f40e05c
@ -370,6 +370,10 @@ static SpiceImage *red_get_image(RedMemSlotInfo *slots, int group_id,
|
||||
red->u.bitmap.format);
|
||||
return NULL;
|
||||
}
|
||||
if (qxl->bitmap.x == 0 || qxl->bitmap.y == 0) {
|
||||
spice_warning("guest error: zero area bitmap\n");
|
||||
return NULL;
|
||||
}
|
||||
qxl_flags = qxl->bitmap.flags;
|
||||
if (qxl_flags & QXL_BITMAP_TOP_DOWN) {
|
||||
red->u.bitmap.flags = SPICE_BITMAP_FLAGS_TOP_DOWN;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user