ia64/xen-unstable

view tools/ioemu/patches/fix-vga-scanning-code-overflow @ 11569:317e8516d464

[qemu patches] Update patches for changeset 11561:c742b2ae920c.

Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author Christian Limpach <Christian.Limpach@xensource.com>
date Thu Sep 21 19:28:35 2006 +0100 (2006-09-21)
parents
children 00618037d37d
line source
1 Index: ioemu/hw/vga.c
2 ===================================================================
3 --- ioemu.orig/hw/vga.c 2006-09-21 19:07:52.000000000 +0100
4 +++ ioemu/hw/vga.c 2006-09-21 19:08:09.000000000 +0100
5 @@ -1463,14 +1463,15 @@
6 */
7 static void vga_draw_graphic(VGAState *s, int full_update)
8 {
9 - int y1, y, update, page_min, page_max, linesize, y_start, double_scan, mask;
10 + int y1, y, update, linesize, y_start, double_scan, mask;
11 int width, height, shift_control, line_offset, bwidth;
12 ram_addr_t page0, page1;
13 int disp_width, multi_scan, multi_run;
14 uint8_t *d;
15 uint32_t v, addr1, addr;
16 vga_draw_line_func *vga_draw_line;
17 -
18 + ram_addr_t page_min, page_max;
19 +
20 full_update |= update_basic_params(s);
22 s->get_resolution(s, &width, &height);
23 @@ -1561,8 +1562,8 @@
24 addr1 = (s->start_addr * 4);
25 bwidth = width * 4;
26 y_start = -1;
27 - page_min = 0x7fffffff;
28 - page_max = -1;
29 + page_min = 0;
30 + page_max = 0;
31 d = s->ds->data;
32 linesize = s->ds->linesize;
33 y1 = 0;
34 @@ -1592,9 +1593,9 @@
35 if (update) {
36 if (y_start < 0)
37 y_start = y;
38 - if (page0 < page_min)
39 + if (page_min == 0 || page0 < page_min)
40 page_min = page0;
41 - if (page1 > page_max)
42 + if (page_max == 0 || page1 > page_max)
43 page_max = page1;
44 vga_draw_line(s, d, s->vram_ptr + addr, width);
45 if (s->cursor_draw_line)