texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Avoid segfault in XS code for missing input file


From: Gavin D. Smith
Subject: branch master updated: Avoid segfault in XS code for missing input file
Date: Tue, 22 Feb 2022 12:07:28 -0500

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 5709a3cfec Avoid segfault in XS code for missing input file
5709a3cfec is described below

commit 5709a3cfeca33ffb87d8a564fc7db52acc08568e
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Tue Feb 22 17:07:18 2022 +0000

    Avoid segfault in XS code for missing input file
    
    * tp/Texinfo/XS/parsetexi/api.c (parse_file): Correctly propagate
    return value of file open.
---
 ChangeLog                     | 7 +++++++
 tp/Texinfo/XS/parsetexi/api.c | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 9257d794af..f5cf027fb5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-02-22  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       Avoid segfault in XS code for missing input file
+
+       * tp/Texinfo/XS/parsetexi/api.c (parse_file): Correctly propagate
+       return value of file open.
+
 2022-02-21  Patrice Dumas  <pertusus@free.fr>
 
        * tp/texi2any.pl (handle_errors): print line_nr if 0. Although
diff --git a/tp/Texinfo/XS/parsetexi/api.c b/tp/Texinfo/XS/parsetexi/api.c
index a640096ad6..642dbaef04 100644
--- a/tp/Texinfo/XS/parsetexi/api.c
+++ b/tp/Texinfo/XS/parsetexi/api.c
@@ -172,7 +172,7 @@ parse_file (char *filename)
   
   status = input_push_file (filename);
   if (status)
-    return 0;
+    return status;
 
   /* Strip off a leading directory path, by looking for the last
      '/' in filename. */



reply via email to

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