Mikulas Patocka 878b8619f7 Fix memory corruption in console selection
Fix an off-by-two memory error in console selection.

The loop below goes from sel_start to sel_end (inclusive), so it writes
one more character.  This one more character was added to the allocated
size (+1), but it was not multiplied by an UTF-8 multiplier.

This patch fixes a memory corruption when UTF-8 console is used and the
user selects a few characters, all of them 3-byte in UTF-8 (for example
a frame line).

When memory redzones are enabled, a redzone corruption is reported.
When they are not enabled, trashing of random memory occurs.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-31 15:51:31 -08:00
..
2009-01-02 10:19:42 -08:00
2009-01-02 10:19:38 -08:00
2009-01-09 03:39:43 -05:00
2008-12-13 11:25:49 -08:00
2008-12-13 09:12:07 +00:00
2008-12-03 21:04:09 +11:00
2009-01-02 10:19:40 -08:00
2009-01-02 10:28:32 -08:00
2009-01-02 10:19:40 -08:00
2009-01-02 10:19:40 -08:00
2009-01-02 10:19:40 -08:00
2009-01-12 16:37:00 -08:00
2009-01-02 10:19:40 -08:00
2009-01-08 16:44:03 -07:00
2009-01-02 10:19:40 -08:00
2008-11-11 21:14:11 -05:00
2009-01-02 10:19:40 -08:00
2009-01-02 10:19:40 -08:00
2009-01-15 16:39:37 -08:00
2009-01-02 10:19:40 -08:00
2009-01-02 10:19:40 -08:00
2008-12-09 20:32:06 +11:00
2009-01-02 10:19:38 -08:00
2009-01-02 10:19:40 -08:00
2009-01-08 08:31:15 -08:00