This patch fixes a minor bug that mcheck picked up. I don't know if it ever causes problems in practice.
-Ken
diff -burN qemu-snapshot-2006-03-27_23.orig/console.c qemu-snapshot-2006-03-27_23/console.c --- qemu-snapshot-2006-03-27_23.orig/console.c 2006-03-11 07:35:30.000000000 -0800 +++ qemu-snapshot-2006-03-27_23/console.c 2006-04-06 00:25:41.000000000 -0700 @@ -407,7 +407,8 @@ if (s->width < w1) w1 = s->width; - cells = qemu_malloc(s->width * s->total_height * sizeof(TextCell)); + cells = qemu_malloc((s->width * s->total_height + 1) * sizeof(TextCell)); + /* Add one extra in case s->width is 0, so we can still store one character. */ for(y = 0; y < s->total_height; y++) { c = &cells[y * s->width]; if (w1 > 0) {
_______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel