Package: lcdproc
Version: 0.5.2
Severity: normal
Tags: patch

The lcdproc curses driver contains a hard coded keyboard check for
control-L to force a screen refresh.  The driver attempts to unget the
character if it wasn't a ^L, but the logic is buggy and discards any
character read *except* for control-L.  The attached patch corrects this.
Also needs applying to 0.5.3.


-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (800, 'stable'), (150, 'testing'), (3, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages lcdproc depends on:
ii  libc6                     2.7-18lenny2   GNU C Library: Shared libraries
ii  libncurses5               5.7+20081213-1 shared libraries for terminal hand
ii  lsb-base                  3.2-20         Linux Standard Base 3.2 init scrip

Versions of packages lcdproc recommends:
pn  lcdproc-extra-drivers         <none>     (no description available)

lcdproc suggests no packages.
--- lcdproc-0.5.3/server/drivers/curses_drv.c.orig	2009-06-07 15:23:56.000000000 +0100
+++ lcdproc-0.5.3/server/drivers/curses_drv.c	2010-05-04 17:41:36.000000000 +0100
@@ -610,11 +610,12 @@
 	PrivateData *p = drvthis->private_data;
 	int c;
 
-	if ((c = getch()) != ERR)
+	if ((c = getch()) != ERR) {
 		if (c == 0x0C) {	/* ^L restores screen */
 			curses_restore_screen(drvthis);
-			ungetch(c);
 		}
+		ungetch(c);
+	}
 
 	if (p->drawBorder)
 		curses_wborder(drvthis);

Reply via email to