android_kernel_xiaomi_sm8350/drivers/char
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
..
agp agp/intel: Fix broken ® symbol in device name. 2008-12-29 10:06:20 +10:00
hw_random [ARM] omap: ensure OMAP drivers pass a struct device to clk_get() 2009-01-24 11:41:16 +00:00
ip2
ipmi
mwave mwave: struct device - replace bus_id with dev_name(), dev_set_name() 2009-01-06 10:44:38 -08:00
pcmcia synclink_cs: Convert to tty_port 2009-01-02 10:19:42 -08:00
rio rio: Kill off ckmalloc 2009-01-02 10:19:38 -08:00
tpm Merge branch 'linus' into release 2009-01-09 03:39:43 -05:00
xilinx_hwicap
.gitignore
amiserial.c m68k: amiserial - Kill warn_unused_result warnings 2009-01-12 20:56:39 +01:00
apm-emulation.c
applicom.c
applicom.h
bfin-otp.c
briq_panel.c
bsr.c powerpc: Cleanup from l64 to ll64 change: drivers/char 2009-01-13 14:48:00 +11:00
cd1865.h
ChangeLog
consolemap.c consolemap: indentation & braces disagree - reindent 2009-01-06 15:59:30 -08:00
cp437.uni
cs5535_gpio.c
cyclades.c drivers/char/cyclades.c: cy_pci_probe: fix error path 2009-01-02 10:19:43 -08:00
defkeymap.c_shipped
defkeymap.map
digi1.h
digiFep1.h
digiPCI.h
ds1302.c
ds1620.c
dsp56k.c
dtlk.c
efirtc.c
epca.c trivial: fix an -> a typos in documentation and comments 2009-01-06 11:28:07 +01:00
epca.h
epcaconfig.h
esp.c tty_port: Add a port level carrier detect operation 2009-01-02 10:19:38 -08:00
generic_nvram.c
generic_serial.c tty: Remove some pointless casts 2009-01-02 10:19:40 -08:00
genrtc.c
hangcheck-timer.c
hpet.c
hvc_beat.c powerpc/cell: Use correct types in beat files 2009-01-08 16:25:16 +11:00
hvc_console.c hvc_console: Remove tty->low_latency 2009-01-16 16:15:16 +11:00
hvc_console.h
hvc_irq.c hvc_console: Call free_irq() only if request_irq() was successful 2009-01-13 14:48:01 +11:00
hvc_iseries.c
hvc_iucv.c [S390] hvc_iucv: Special handling of IUCV HVC devices 2009-01-09 12:15:09 +01:00
hvc_rtas.c
hvc_udbg.c
hvc_vio.c
hvc_xen.c
hvcs.c
hvsi.c tty: Remove some pointless casts 2009-01-02 10:19:40 -08:00
i8k.c i8k: Add Dell Vostro systems 2009-01-02 10:28:32 -08:00
isicom.c tty: Introduce some close helpers for ports 2009-01-02 10:19:40 -08:00
istallion.c tty: Introduce some close helpers for ports 2009-01-02 10:19:40 -08:00
Kconfig powerpc: Fix iseries drivers build failure without CONFIG_VIOPATH 2009-01-08 16:25:14 +11:00
keyboard.c
lp.c
Makefile Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2008-12-28 16:54:33 -08:00
mbcs.c
mbcs.h
mem.c mm: make vread() and vwrite() declaration 2009-01-06 15:59:05 -08:00
misc.c
mmtimer.c
moxa.c tty_port: Add a port level carrier detect operation 2009-01-02 10:19:38 -08:00
moxa.h
mspec.c
mxser.c tty: Introduce some close helpers for ports 2009-01-02 10:19:40 -08:00
mxser.h
n_hdlc.c
n_r3964.c tty: Remove some pointless casts 2009-01-02 10:19:40 -08:00
n_tty.c tty: N_TTY SIGIO only works for read 2009-01-02 10:19:40 -08:00
nozomi.c tty: kref nozomi 2009-01-02 10:19:40 -08:00
nsc_gpio.c
nvram.c
nwbutton.c
nwbutton.h
nwflash.c
pc8736x_gpio.c
ppdev.c
ps3flash.c powerpc/ps3: Printing fixups for l64 to ll64 conversion drivers/char 2009-01-16 16:15:14 +11:00
pty.c pty: Fix documentation 2009-01-12 16:37:00 -08:00
random.c random: don't try to look at entropy_count outside the lock 2009-01-06 15:59:30 -08:00
raw.c
riscom8_reg.h
riscom8.c tty: Remove some pointless casts 2009-01-02 10:19:40 -08:00
riscom8.h
rocket_int.h tty: rocketport uses different port flags to everyone else 2009-01-02 10:19:39 -08:00
rocket.c tty: use port methods for the rocket driver 2009-01-02 10:19:42 -08:00
rocket.h tty: rocketport uses different port flags to everyone else 2009-01-02 10:19:39 -08:00
rtc.c RTC: Remove the BKL. 2009-01-08 16:44:03 -07:00
scc.h
scx200_gpio.c
selection.c Fix memory corruption in console selection 2009-01-31 15:51:31 -08:00
ser_a2232.c m68k: ser_a2232 - Kill warn_unused_result warnings 2009-01-12 20:56:39 +01:00
ser_a2232.h
ser_a2232fw.ax
ser_a2232fw.h
serial167.c tty: Remove some pointless casts 2009-01-02 10:19:40 -08:00
snsc_event.c
snsc.c
snsc.h
sonypi.c
specialix_io8.h
specialix.c tty: Remove some pointless casts 2009-01-02 10:19:40 -08:00
stallion.c tty: Introduce some close helpers for ports 2009-01-02 10:19:40 -08:00
sx.c tty: Remove some pointless casts 2009-01-02 10:19:40 -08:00
sx.h
sxboards.h
sxwindow.h
synclink_gt.c synclink_gt: enable RI interrupt 2009-01-15 16:39:37 -08:00
synclink.c tty: Remove some pointless casts 2009-01-02 10:19:40 -08:00
synclinkmp.c tty: Remove some pointless casts 2009-01-02 10:19:40 -08:00
sysrq.c sysrq: add commentary on why we use the console loglevel over using KERN_EMERG 2009-01-15 16:39:36 -08:00
tb0219.c
tlclk.c
toshiba.c
tty_audit.c
tty_buffer.c
tty_io.c tty_open can return to userspace holding tty_mutex 2009-01-27 07:37:15 -08:00
tty_ioctl.c tty: Fix race in the flush for some ldiscs 2009-01-15 12:48:35 -08:00
tty_ldisc.c tty: Fix PPP hang under load 2009-01-02 10:19:38 -08:00
tty_port.c tty: use port methods for the rocket driver 2009-01-02 10:19:42 -08:00
vc_screen.c
viotape.c
virtio_console.c virtio_console: support console resizing 2008-12-30 09:26:10 +10:30
vme_scc.c m68k: vme_scc - Kill warn_unused_result warnings 2009-01-12 20:56:38 +01:00
vr41xx_giu.c
vt_ioctl.c tty: Remove some pointless casts 2009-01-02 10:19:40 -08:00
vt.c Make various things static 2009-01-08 08:31:15 -08:00