qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Kenneth Duda" <kduda@arastra.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Patch for minor qemu heap corruption bug when the console is zero width
Date: Thu, 06 Apr 2006 08:53:49 -0000	[thread overview]
Message-ID: <6fe044190604060153i6b43333dlec41c663f2229cd3@mail.gmail.com> (raw)
In-Reply-To: <6fe044190604060146i4377f13eub00639e764074f2e@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 119 bytes --]

This patch fixes a minor bug that mcheck picked up.  I don't know if
it ever causes problems in practice.

   -Ken

[-- Attachment #2: qemu-zero-width-console.patch --]
[-- Type: text/plain, Size: 663 bytes --]

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) {


       reply	other threads:[~2006-04-06  8:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6fe044190604060146i4377f13eub00639e764074f2e@mail.gmail.com>
2006-04-06  8:53 ` Kenneth Duda [this message]
2006-04-07 18:08   ` [Qemu-devel] Patch for minor qemu heap corruption bug when the console is zero width Kenneth Duda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6fe044190604060153i6b43333dlec41c663f2229cd3@mail.gmail.com \
    --to=kduda@arastra.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).