gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libextractor] 26/27: check return values from dup2()


From: gnunet
Subject: [GNUnet-SVN] [libextractor] 26/27: check return values from dup2()
Date: Sun, 15 Oct 2017 21:34:50 +0200

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

grothoff pushed a commit to branch master
in repository libextractor.

commit 8968dccfb6f38b47fec287a889a2799f35a38ba8
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Oct 15 21:29:17 2017 +0200

    check return values from dup2()
---
 src/plugins/pdf_extractor.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/plugins/pdf_extractor.c b/src/plugins/pdf_extractor.c
index cd58bffb..da1f6636 100644
--- a/src/plugins/pdf_extractor.c
+++ b/src/plugins/pdf_extractor.c
@@ -178,8 +178,9 @@ EXTRACTOR_pdf_extract_method (struct 
EXTRACTOR_ExtractContext *ec)
       /* am child, exec 'pdfinfo' */
       close (0);
       close (1);
-      dup2 (in[0], 0);
-      dup2 (out[1], 1);
+      if ( (-1 == dup2 (in[0], 0)) ||
+           (-1 == dup2 (out[1], 1)) )
+        exit (1);
       close (in[0]);
       close (in[1]);
       close (out[0]);

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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