vt: incomplete initialization of vc_tab_stop
authorWolfgang Kroworsch <wolfgang@kroworsch.de>
Thu, 6 Nov 2008 20:53:16 +0000 (12:53 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 6 Nov 2008 23:41:17 +0000 (15:41 -0800)
commita564738c1c9c7b9ed696bf4116267789201ac8ac
treee5bd2ee7c28e2831bea5c1727452978c76c1c108
parent2197d18ded232ef6eef63cce57b6b21eddf1b7b6
vt: incomplete initialization of vc_tab_stop

Problem 1 (see patch below):
  vc_tab_stop is declared as an array of 8 unsigned ints in struct
  vc_data in include/linux/console_struct.h .
  In drivers/char/vt.c only 5 of these 8 unsigned ints get initialized
  leading to unintended tabulator placement on displays with more than
  160 columns text.

Problem 2 (open):
  Upcoming displays will have more than 256 columns of text leading to
  invalid memory access in drivers/char/vt.c during tabulator
  calculations:
    if (vc->vc_tab_stop[vc->vc_x >> 5] & (1 << (vc->vc_x & 31)))
break;

Signed-off-by: Wolfgang Kroworsch <wolfgang@kroworsch.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/vt.c