texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * info/man.c (get_manpage_from_formatter): Check


From: Gavin D. Smith
Subject: branch master updated: * info/man.c (get_manpage_from_formatter): Check return value of 'pipe'.
Date: Mon, 11 Apr 2022 07:31:15 -0400

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new ee29a87d41 * info/man.c (get_manpage_from_formatter): Check return 
value of 'pipe'.
ee29a87d41 is described below

commit ee29a87d41e3fd04b627746f286abc08a759d421
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Mon Apr 11 12:31:06 2022 +0100

    * info/man.c (get_manpage_from_formatter): Check return value
    of 'pipe'.
---
 ChangeLog  | 5 +++++
 info/man.c | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 5979ff427a..12354cbf37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-04-11  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       * info/man.c (get_manpage_from_formatter): Check return value
+       of 'pipe'.
+
 2022-04-11  Gavin Smith  <gavinsmith0123@gmail.com>
 
        wrapper for asprintf
diff --git a/info/man.c b/info/man.c
index 16958992bb..32019d4695 100644
--- a/info/man.c
+++ b/info/man.c
@@ -310,7 +310,8 @@ get_manpage_from_formatter (char *formatter_args[])
      in FORMATTED_PAGE.  The reader end of the pipe is pipes[0]; the
      writer end is pipes[1]. */
 #if PIPE_USE_FORK
-  pipe (pipes);
+  if (pipe (pipes) == -1)
+    return 0; /* Creating pipe failed. */
 
   child = fork ();
   if (child == -1)



reply via email to

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