3b0835794b
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.
13 lines
426 B
Plaintext
13 lines
426 B
Plaintext
$OpenBSD: patch-attach_c,v 1.1.1.1 2006/03/05 17:05:36 niallo Exp $
|
|
--- attach.c.orig Sun Feb 26 01:16:57 2006
|
|
+++ attach.c Sun Feb 26 01:17:00 2006
|
|
@@ -59,7 +59,7 @@ connect_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 (connect(s, (struct sockaddr*)&sockun, sizeof(sockun)) < 0)
|
|
{
|
|
close(s);
|