All pastes #21013 Raw Edit

Anonymous

public text v1 · immutable
#21013 ·published 2005-08-24 19:11 UTC
rendered paste body
diff -rNwuBb ./gnome-pty-helper/gnome-pty-helper.c /usr/ports/x11-toolkits/vte/work/vte-0.11.15/gnome-pty-helper/gnome-pty-helper.c
--- ./gnome-pty-helper/gnome-pty-helper.c   Wed Aug 24 11:45:21 2005
+++ /usr/ports/x11-toolkits/vte/work/vte-0.11.15/gnome-pty-helper/gnome-pty-helper.c    Wed Aug 24 11:48:56 2005
@@ -94,13 +94,13 @@
 #endif
 #endif /* CMSG_DATA */

-#define CONTROLLEN (sizeof (struct cmsghdr)  + sizeof (long))
-
 static struct cmsghdr *cmptr;
+static int CONTROLLEN;

 static int
 init_msg_pass ()
 {
+   CONTROLLEN = (CMSG_DATA (cmptr) - (unsigned char *)cmptr) + sizeof(long);
    cmptr = malloc (CONTROLLEN);

    if (cmptr)
@@ -655,6 +655,14 @@
    }
 }