[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
- [GNUnet-SVN] [libextractor] 13/27: seems some specs of c_time allow up to 71 bytes, so increase buffer size just to be safe, (continued)
- [GNUnet-SVN] [libextractor] 13/27: seems some specs of c_time allow up to 71 bytes, so increase buffer size just to be safe, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 19/27: need isspace, not isblank for rpm extractor, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 17/27: handle allocation failure in PDF fdopen call, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 18/27: do not try to seek on SHM if we do not use SHM, even if (bad) plugin requests it, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 10/27: be more careful with memory allocation failures in gsf extractor, avoid calling g_free(NULL), gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 20/27: fix signed/unsigned comparison issue, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 21/27: handle IPC_shared_memory_set_ error, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 25/27: avoid NPE on empty value in grep-friendly printing, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 12/27: fix NPE in extract for 0-byte values, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 07/27: doxygen improvements, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 26/27: check return values from dup2(),
gnunet <=
- [GNUnet-SVN] [libextractor] 22/27: remove useless assignment, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 24/27: avoid calling free(NULL) on plugin load error, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 27/27: update gitignore, gnunet, 2017/10/15
- [GNUnet-SVN] [libextractor] 23/27: extra-carefully check return value of snprintf, gnunet, 2017/10/15