gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [libextractor-perl] 07/08: address@hidden: rafl | 2005-11-1


From: gnunet
Subject: [GNUnet-SVN] [libextractor-perl] 07/08: address@hidden: rafl | 2005-11-13 22:51:22 +0100 * Fixed a segfault
Date: Sat, 13 Apr 2019 13:48:37 +0200

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

ng0 pushed a commit to branch master
in repository libextractor-perl.

commit 3210118c97bcf55aef60cfcf3334fe5c79220846
Author: Florian Ragwitz <address@hidden>
AuthorDate: Sun Nov 13 21:32:44 2005 +0000

     address@hidden:  rafl | 2005-11-13 22:51:22 +0100
     * Fixed a segfault
---
 xs/Extract.xs | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/xs/Extract.xs b/xs/Extract.xs
index 9298296..4eb44af 100644
--- a/xs/Extract.xs
+++ b/xs/Extract.xs
@@ -139,10 +139,21 @@ getLibraries(extractor)
                EXTRACTOR_ExtractorList* list = NULL;
                EXTRACTOR_ExtractorList* i = NULL;
        PPCODE:
-               list = 
SvEXTRACTOR_ExtractorList(pextract_get_extractor_list(extractor));
-               for (i = list; i != NULL; i = i->next) {
+               list = 
SvEXTRACTOR_ExtractorList_ornull(pextract_get_extractor_list(extractor));
+               i = list;
+               while (i != NULL) {
+                       if (!i->libname)
+                               continue;
+
                        XPUSHs(sv_2mortal(newSVpv(i->libname, 
strlen(i->libname))));
-                       XPUSHs(sv_2mortal(newSVpv(i->options, 
strlen(i->options))));
+
+                       if (i->options) {
+                               XPUSHs(sv_2mortal(newSVpv(i->options, 
strlen(i->options))));
+                       } else {
+                               XPUSHs(&PL_sv_undef);
+                       }
+
+                       i = i->next;
                }
 
 #BOOT:

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



reply via email to

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