lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 28 Apr 2008 08:46:07 +0200 (CEST)
From:	Jan Engelhardt <jengelh@...putergmbh.de>
To:	Andrew Morton <akpm@...ux-foundation.org>
cc:	adaplas@...il.com,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	hpa@...or.com
Subject: Re: [PATCH] vt: fix background color on line feed


On Monday 2008-04-28 04:36, Andrew Morton wrote:
>> commit c5180a555ced08a7e3011c16ef796e47569ae907
>> Author: Jan Engelhardt <jengelh@...putergmbh.de>
>> Date:   Thu Apr 24 22:40:24 2008 +0200
>> 
>> vt: fix background color on line feed
>>     
>> A command that causes a line feed while a background color is active,
>> such as
>>     
>> 	perl -e 'print "x" x 60, "\e[44m", "x" x 40, "\e[0m\n"'
>> and
>> 	perl -e 'print "x" x 40, "\e[44m\n", "x" x 40, "\e[0m\n"'
>>     
>> causes the line that was started as a result of the line feed to be
>> completely filled with the currently active background color instead
>> of the default color.
>
>Thanks.
>
>It would be better if the the changelog were to also describe the cause of
>the bug, and how the patch fixes it.
>
Please append:

When scrolling, part of the current screen is memcpy'd/memmove'd to
the new region, and the new line(s) that will appear as a result are
cleared using memset. However, the lines are cleared with
vc->vc_video_erase_char, causing them to be colored with the
currently active background color. This is different from X11
terminal emulators which always paint the new lines with the default
background color (e.g. `xterm -bg black`).

The clear operation (\e[1J and \e[2J) also use vc_video_erase_char,
so a new vc->vc_scrl_erase_char is introduced with contains the erase
character used for scrolling, which is built from vc->vc_def_color
instead of vc->vc_color.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ