bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] Properly set PIPE_USE_FORK for Cygwin


From: Christopher Faylor
Subject: [patch] Properly set PIPE_USE_FORK for Cygwin
Date: Fri, 27 Mar 2009 11:20:56 -0400
User-agent: Mutt/1.5.16 (2007-06-09)

This indirectly fixes a dereference of a NULL pointer in man.c when
compiling under Cygwin by setting the proper PIPE_USE_FORK define for
Cygwin.

There still seems to be a NULL dereference in a !PIPE_USE_FORK path
around line 340 in man.c:

    char *cmdline = xmalloc (strlen (formatter_args[0])
                             + strlen (manpage_pagename)
                             + (arg_index > 2 ? strlen (manpage_section) : 0)
                             + 3);

The SEGV is just an FYI.  I believe that the Cygwin fix is trivially
correct and hope you'll consider applying it.

cgf

2009-03-27  Christopher Faylor  <address@hidden>

        * system.h: Avoid erroneously redefining PIPE_USE_FORK when compiling
        for Cygwin.

--- system.h.orig       2008-07-26 18:54:54.000000000 -0400
+++ system.h    2009-03-27 11:05:17.343135205 -0400
@@ -187,6 +187,7 @@
 #  define DEFAULT_TMPDIR       "c:/"
 #  define PATH_SEP     ";"
 #  define STRIP_DOT_EXE        1
+#  define PIPE_USE_FORK        0
 # endif /* O_BINARY && !__CYGWIN__ */
   /* Back to any O_BINARY system.  */
 # define FILENAME_CMP  mbscasecmp
@@ -196,7 +197,6 @@
 # define HAVE_DRIVE(n) ((n)[0] && (n)[1] == ':')
 # define IS_SLASH(c)   ((c) == '/' || (c) == '\\')
 # define IS_ABSOLUTE(n)        (IS_SLASH((n)[0]) || HAVE_DRIVE(n))
-# define PIPE_USE_FORK 0
 # define SET_BINARY(f)  do {if (!isatty(f)) setmode(f,O_BINARY);} while(0)
 
 #else  /* not O_BINARY, i.e., Unix */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]