reserve sufficient space for tty name

This commit is contained in:
naddy 2012-12-12 20:39:25 +00:00
parent c969020940
commit 0fe50ed6e4
2 changed files with 14 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.26 2012/12/11 21:09:18 naddy Exp $
# $OpenBSD: Makefile,v 1.27 2012/12/12 20:39:25 naddy Exp $
COMMENT= filemanager for X Window
DISTNAME= xnc-4.4.7
REVISION= 3
REVISION= 4
DISTFILES= ${DISTNAME}.src${EXTRACT_SUFX}
SHARED_LIBS= xncaqua 1.0 \
xncfive 1.0

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-rxvt2_command_c,v 1.1 2012/12/12 20:39:25 naddy Exp $
--- rxvt2/command.c.orig Wed Dec 12 21:33:54 2012
+++ rxvt2/command.c Wed Dec 12 21:36:21 2012
@@ -632,7 +632,7 @@ get_pty(void)
char *ptydev;
#ifdef PTYS_ARE_OPENPTY
- char tty_name[sizeof "/dev/pts/????\0"];
+ char tty_name[16];
if (openpty(&fd, &rxvt_ttyfd, tty_name, NULL, NULL) != -1) {
ttydev = strdup(tty_name);