openbsd-ports/misc/dtach/patches/patch-master_c
niallo 3b0835794b Import dtach.
DESCR:

dtach is a tiny program that emulates the detach feature of screen,
allowing you to run a program in an environment that is protected from
the controlling terminal and attach to it later. dtach does not keep
track of the contents of the screen, and thus works best with programs
that know how to redraw themselves.
2006-03-05 17:05:36 +00:00

21 lines
641 B
Plaintext

$OpenBSD: patch-master_c,v 1.1.1.1 2006/03/05 17:05:36 niallo Exp $
--- master.c.orig Sun Jul 4 17:07:03 2004
+++ master.c Sun Feb 26 01:19:14 2006
@@ -17,6 +17,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "dtach.h"
+#define HAVE_OPENPTY
/* The pty struct - The pty information is stored here. */
struct pty
@@ -124,7 +125,7 @@ create_socket(char *name)
if (s < 0)
return -1;
sockun.sun_family = AF_UNIX;
- strcpy(sockun.sun_path, name);
+ strlcpy(sockun.sun_path, name, sizeof(sockun.sun_path));
if (bind(s, (struct sockaddr*)&sockun, sizeof(sockun)) < 0)
{
close(s);