From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O4lCp-0000Te-Ud for qemu-devel@nongnu.org; Wed, 21 Apr 2010 21:27:51 -0400 Received: from [140.186.70.92] (port=36873 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O4lCo-0000S7-4O for qemu-devel@nongnu.org; Wed, 21 Apr 2010 21:27:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O4lCm-0005hx-AE for qemu-devel@nongnu.org; Wed, 21 Apr 2010 21:27:50 -0400 Received: from mail-bw0-f211.google.com ([209.85.218.211]:43931) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O4lCm-0005hi-5c for qemu-devel@nongnu.org; Wed, 21 Apr 2010 21:27:48 -0400 Received: by bwz3 with SMTP id 3so7385366bwz.11 for ; Wed, 21 Apr 2010 18:27:46 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20100420093835.GC9079@chrom.inf.tu-dresden.de> References: <20100420093835.GC9079@chrom.inf.tu-dresden.de> Date: Thu, 22 Apr 2010 03:27:45 +0200 Message-ID: Subject: Re: [Qemu-devel] [PATCH] fix curses update From: andrzej zaborowski Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bernhard Kauer Cc: qemu-devel@nongnu.org Hi, On 20 April 2010 11:38, Bernhard Kauer wrote: > If a terminal is resized or the VGA model issues a full refresh, curses_u= pdate() > is called, which uses mvwaddchnstr() to draw a full line of characters. = =C2=A0Unfortunatelly > this routine expects a null-terminated string and early aborts if a null = is present > in the line. > > When booting an OS that zeros the VGA text buffer and later pokes single = characters, > the console output can become unreadable. =C2=A0The attached patch correc= ts this bug. I believe this issue has come up before with a similar patch but someone checked their ncurses and they didn't see the same issue. I just checked and here mvwaddchnstr() does not expect a null-terminated string either, but it skips the \0 characters. So probably we should replace them with spaces or something else, I wouldn't like to replace a single library call with 80 calls, it's better to go through the string and replace them, maybe in console_write_ch or somewhere else. Cheers