summaryrefslogtreecommitdiffstats
path: root/x11vnc/unixpw.c
diff options
context:
space:
mode:
authorrunge <runge@karlrunge.com>2010-12-21 12:04:02 -0500
committerrunge <runge@karlrunge.com>2010-12-21 12:04:02 -0500
commit365a22c63cb292ea494f39ebc48a37e322e5eb14 (patch)
treeca6e87ab396ee00a837b09b2c6cede62aec69dae /x11vnc/unixpw.c
parentd4fabc217e8cd02aca4d248229bb8a030b2bbfe2 (diff)
downloadlibtdevnc-365a22c63cb292ea494f39ebc48a37e322e5eb14.tar.gz
libtdevnc-365a22c63cb292ea494f39ebc48a37e322e5eb14.zip
x11vnc: touchscreen uinput support and Java viewer mousewheel support. See x11vnc/ChangeLog for rest.
Diffstat (limited to 'x11vnc/unixpw.c')
-rw-r--r--x11vnc/unixpw.c10
1 files changed, 8 insertions, 2 deletions
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) {