[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7911] malformed-split.sh test
From: |
gavinsmith0123 |
Subject: |
[7911] malformed-split.sh test |
Date: |
Sun, 9 Jul 2017 11:12:16 -0400 (EDT) |
Revision: 7911
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7911
Author: gavin
Date: 2017-07-09 11:12:16 -0400 (Sun, 09 Jul 2017)
Log Message:
-----------
malformed-split.sh test
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/Makefile.am
trunk/info/info.c
trunk/info/nodes.c
Added Paths:
-----------
trunk/info/t/infodir/malformed-split.info
trunk/info/t/malformed-split.sh
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2017-07-09 14:59:53 UTC (rev 7910)
+++ trunk/ChangeLog 2017-07-09 15:12:16 UTC (rev 7911)
@@ -1,5 +1,14 @@
2017-07-09 Gavin Smith <address@hidden>
+ * info/nodes.c (info_load_file): If calling
+ 'build_tags_and_nodes' didn't set the 'tags' array for the file
+ buffer, fail to load the file.
+ * info/info.c (add_initial_nodes): Check if info_load_file failed.
+
+ * info/t/malformed-split.sh: New test.
+
+2017-07-09 Gavin Smith <address@hidden>
+
* info/t/Init-inter.inc (run_ginfo): Shorten a comment.
2017-07-09 Gavin Smith <address@hidden>
Modified: trunk/info/Makefile.am
===================================================================
--- trunk/info/Makefile.am 2017-07-09 14:59:53 UTC (rev 7910)
+++ trunk/info/Makefile.am 2017-07-09 15:12:16 UTC (rev 7911)
@@ -93,6 +93,7 @@
t/no-file.sh \
t/node-no-file.sh \
t/split.sh \
+ t/malformed-split.sh \
t/relative-path.sh \
t/file-relative-path.sh \
t/dir.sh \
Modified: trunk/info/info.c
===================================================================
--- trunk/info/info.c 2017-07-09 14:59:53 UTC (rev 7910)
+++ trunk/info/info.c 2017-07-09 15:12:16 UTC (rev 7911)
@@ -375,6 +375,8 @@
node_nodename = 0;
file_buffer = info_find_file (node_filename);
+ if (!file_buffer)
+ continue;
/* First look for an exact match. */
for (j = 0; (tag = file_buffer->tags[j]); j++)
Modified: trunk/info/nodes.c
===================================================================
--- trunk/info/nodes.c 2017-07-09 14:59:53 UTC (rev 7910)
+++ trunk/info/nodes.c 2017-07-09 15:12:16 UTC (rev 7911)
@@ -725,7 +725,16 @@
get_file_character_encoding (file_buffer);
if (!is_subfile)
- build_tags_and_nodes (file_buffer);
+ {
+ build_tags_and_nodes (file_buffer);
+ if (!file_buffer->tags)
+ {
+ free (file_buffer->fullpath);
+ free (file_buffer->filename);
+ free (file_buffer);
+ return 0;
+ }
+ }
else
file_buffer->flags |= N_Subfile;
Added: trunk/info/t/infodir/malformed-split.info
===================================================================
(Binary files differ)
Index: trunk/info/t/infodir/malformed-split.info
===================================================================
--- trunk/info/t/infodir/malformed-split.info 2017-07-09 14:59:53 UTC (rev
7910)
+++ trunk/info/t/infodir/malformed-split.info 2017-07-09 15:12:16 UTC (rev
7911)
Property changes on: trunk/info/t/infodir/malformed-split.info
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/info/t/malformed-split.sh
===================================================================
--- trunk/info/t/malformed-split.sh (rev 0)
+++ trunk/info/t/malformed-split.sh 2017-07-09 15:12:16 UTC (rev 7911)
@@ -0,0 +1,28 @@
+#!/bin/sh
+# Copyright (C) 2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+srcdir=${srcdir:-.}
+. $srcdir/t/Init-test.inc
+. $t/Init-inter.inc
+
+# Load a split file with a malformed or missing tag table.
+
+run_ginfo --file malformed-split --node Two
+printf q >$PTY_TYPE
+
+timeout_test
+
+cleanup
Property changes on: trunk/info/t/malformed-split.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7911] malformed-split.sh test,
gavinsmith0123 <=