From 365a22c63cb292ea494f39ebc48a37e322e5eb14 Mon Sep 17 00:00:00 2001 From: runge Date: Tue, 21 Dec 2010 12:04:02 -0500 Subject: x11vnc: touchscreen uinput support and Java viewer mousewheel support. See x11vnc/ChangeLog for rest. --- x11vnc/unixpw.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'x11vnc/unixpw.c') diff --git a/x11vnc/unixpw.c b/x11vnc/unixpw.c index b610fa9..ccdb195 100644 --- a/x11vnc/unixpw.c +++ b/x11vnc/unixpw.c @@ -565,6 +565,12 @@ char *get_pty_ptmx(int *fd_p) { ioctl(fd, TIOCFLUSH, (char *) 0); #endif + if (strlen(slave) > sizeof(slave_str)/2) { + rfbLog("get_pty_ptmx: slave string length too long.\n"); + close(fd); + return NULL; + } + strcpy(slave_str, slave); *fd_p = fd; return slave_str; @@ -1743,7 +1749,7 @@ void unixpw_keystroke(rfbBool down, rfbKeySym keysym, int init) { down ? "down":"up ", keysym, keystr); } - if (keysym == XK_Return || keysym == XK_Linefeed) { + if (keysym == XK_Return || keysym == XK_Linefeed || keysym == XK_Tab) { /* let "up" pass down below for Return case */ if (down) { return; @@ -1866,7 +1872,7 @@ void unixpw_keystroke(rfbBool down, rfbKeySym keysym, int init) { return; } - if (keysym == XK_Return || keysym == XK_Linefeed) { + if (keysym == XK_Return || keysym == XK_Linefeed || keysym == XK_Tab) { char pw[] = "Password: "; if (down) { -- cgit v1.2.3