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
..
2008-12-29 10:06:20 +10:00
2009-01-24 11:41:16 +00:00
2008-10-16 09:24:42 -07:00
2008-11-12 17:17:16 -08:00
2009-01-06 10:44:38 -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-17 11:23:07 -08:00
2006-10-03 17:59:17 +01:00
2009-01-12 20:56:39 +01:00
2008-07-16 23:27:02 +02:00
2008-10-16 11:21:47 -07:00
2008-04-25 08:04:56 +08:00
2008-06-20 14:05:55 -06:00
2009-01-13 14:48:00 +11:00
2009-01-06 15:59:30 -08:00
2008-12-13 11:25:49 -08:00
2008-06-20 14:05:53 -06:00
2009-01-02 10:19:43 -08:00
2008-03-03 14:53:16 -08:00
2008-10-20 08:52:41 -07:00
2008-12-13 09:12:07 +00:00
2008-10-16 09:24:42 -07:00
2008-06-20 14:05:53 -06:00
2008-08-04 16:59:56 -07:00
2009-01-06 11:28:07 +01:00
2008-07-20 17:12:36 -07:00
2009-01-02 10:19:38 -08:00
2008-06-12 18:05:41 -07:00
2009-01-02 10:19:40 -08:00
2008-06-20 14:05:57 -06:00
2008-02-03 17:11:42 +02:00
2008-11-24 10:05:12 +01:00
2009-01-08 16:25:16 +11:00
2009-01-16 16:15:16 +11:00
2008-12-03 21:04:13 +11:00
2009-01-13 14:48:01 +11:00
2008-12-03 21:04:09 +11:00
2009-01-09 12:15:09 +01:00
2008-02-14 22:11:02 +11:00
2008-11-19 16:04:25 +11:00
2008-12-03 21:04:09 +11:00
2008-10-22 10:59:54 +11:00
2008-12-03 21:04:13 +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-08 16:25:14 +11:00
2008-10-08 23:45:36 -04:00
2008-10-16 09:24:42 -07:00
2008-12-28 16:54:33 -08:00
2008-06-20 14:05:48 -06:00
2008-02-07 08:42:25 -08:00
2009-01-06 15:59:05 -08:00
2008-10-16 09:24:42 -07:00
2008-07-17 11:34:49 -07:00
2009-01-02 10:19:38 -08:00
2008-04-30 08:29:43 -07:00
2008-07-24 10:47:14 -07:00
2009-01-02 10:19:40 -08:00
2008-04-30 08:29:49 -07:00
2008-10-13 09:51:44 -07: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
2006-12-08 08:28:44 -08:00
2008-11-11 09:56:00 +00:00
2007-02-12 09:48:30 -08:00
2006-10-05 15:10:12 +01:00
2008-12-13 09:12:07 +00:00
2008-10-20 08:52:40 -07:00
2008-10-16 09:24:42 -07:00
2009-01-16 16:15:14 +11:00
2009-01-12 16:37:00 -08:00
2009-01-06 15:59:30 -08:00
2008-10-21 07:49:14 -04:00
2009-01-02 10:19:40 -08:00
2008-07-20 17:12:38 -07:00
2009-01-02 10:19:39 -08:00
2009-01-02 10:19:42 -08:00
2009-01-02 10:19:39 -08:00
2009-01-08 16:44:03 -07:00
2006-01-12 09:09:00 -08:00
2008-06-20 14:05:53 -06:00
2009-01-31 15:51:31 -08:00
2009-01-12 20:56:39 +01:00
2009-01-02 10:19:40 -08:00
2008-05-16 12:01:45 -07:00
2008-10-16 09:24:42 -07:00
2008-04-18 22:22:54 -04:00
2008-11-11 21:14:11 -05:00
2008-07-20 17:12:38 -07: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
2008-02-07 08:42:33 -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
2009-01-15 16:39:36 -08:00
2008-06-20 14:05:53 -06:00
2008-06-20 14:05:51 -06:00
2008-04-30 23:15:34 +02:00
2008-12-09 20:32:06 +11:00
2008-10-13 09:51:40 -07:00
2009-01-27 07:37:15 -08:00
2009-01-15 12:48:35 -08:00
2009-01-02 10:19:38 -08:00
2009-01-02 10:19:42 -08:00
2008-10-16 09:24:42 -07:00
2008-10-16 09:24:42 -07:00
2008-12-30 09:26:10 +10:30
2009-01-12 20:56:38 +01:00
2008-10-16 16:52:05 +02:00
2009-01-02 10:19:40 -08:00
2009-01-08 08:31:15 -08:00