gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libextractor] 17/27: handle allocation failure in PDF fdop


From: gnunet
Subject: [GNUnet-SVN] [libextractor] 17/27: handle allocation failure in PDF fdopen call
Date: Sun, 15 Oct 2017 21:34:41 +0200

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

grothoff pushed a commit to branch master
in repository libextractor.

commit 774014cdbdf1e5565ff3ad16cb9e8c983ed06369
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Oct 15 20:36:55 2017 +0200

    handle allocation failure in PDF fdopen call
---
 src/plugins/pdf_extractor.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/plugins/pdf_extractor.c b/src/plugins/pdf_extractor.c
index 14258a7d..cd58bffb 100644
--- a/src/plugins/pdf_extractor.c
+++ b/src/plugins/pdf_extractor.c
@@ -191,7 +191,14 @@ EXTRACTOR_pdf_extract_method (struct 
EXTRACTOR_ExtractContext *ec)
   close (in[0]);
   close (out[1]);
   fout = fdopen (out[0], "r");
-
+  if (NULL == fout)
+    {
+      close (in[1]);
+      close (out[0]);
+      kill (pid, SIGKILL);
+      waitpid (pid, NULL, 0);
+      return;
+    }
   pos = 0;
   while (pos < fsize)
     {

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



reply via email to

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