diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-04-15 22:35:16 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-04-15 22:35:16 +0000 |
commit | 3294b949eb97f41e29432830370eba62a6d5f28d (patch) | |
tree | 9ba3790ad8df5e6813aa57382f5a000245859596 /hw/vga.c | |
parent | 2aebb3eb2b939d996ef6a905b42c70931e02a8ba (diff) | |
download | qemu-3294b949eb97f41e29432830370eba62a6d5f28d.zip qemu-3294b949eb97f41e29432830370eba62a6d5f28d.tar.gz qemu-3294b949eb97f41e29432830370eba62a6d5f28d.tar.bz2 |
avoid segfault if transient invalid text resolution
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@727 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/vga.c')
-rw-r--r-- | hw/vga.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1154,6 +1154,11 @@ static void vga_draw_text(VGAState *s, int full_update) ((s->cr[0x07] & 0x40) << 3); height = (height + 1) / cheight; } + if ((height * width) > CH_ATTR_SIZE) { + /* better than nothing: exit if transient size is too big */ + return; + } + if (width != s->last_width || height != s->last_height || cw != s->last_cw || cheight != s->last_ch) { s->last_scr_width = width * cw; |