diff options
author | 2019-05-27 07:13:38 +0000 | |
---|---|---|
committer | 2019-05-27 07:13:38 +0000 | |
commit | 1f65d55c05a93c580a58cba3ccfa46170ab90f2b (patch) | |
tree | 24b74497f773698ddf5d2247c928c30f4f16abb5 | |
parent | add vulkan dirs (diff) | |
download | wireguard-openbsd-1f65d55c05a93c580a58cba3ccfa46170ab90f2b.tar.xz wireguard-openbsd-1f65d55c05a93c580a58cba3ccfa46170ab90f2b.zip |
fix core dump reported by Adam Thomson; ok tb@
-rw-r--r-- | gnu/usr.bin/texinfo/makeinfo/cmds.c | 3 | ||||
-rw-r--r-- | gnu/usr.bin/texinfo/makeinfo/xml.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/gnu/usr.bin/texinfo/makeinfo/cmds.c b/gnu/usr.bin/texinfo/makeinfo/cmds.c index 88c0da3deab..ca7ffed966c 100644 --- a/gnu/usr.bin/texinfo/makeinfo/cmds.c +++ b/gnu/usr.bin/texinfo/makeinfo/cmds.c @@ -1,5 +1,5 @@ /* cmds.c -- Texinfo commands. - $Id: cmds.c,v 1.3 2006/07/17 16:12:36 espie Exp $ + $Id: cmds.c,v 1.4 2019/05/27 07:13:38 otto Exp $ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. @@ -624,6 +624,7 @@ cm_comment (void) /* Use insert for HTML, and XML when indentation is enabled. For Docbook, use add_char. */ if (xml && xml_indentation_increment > 0 + && output_paragraph_offset > 0 && output_paragraph[output_paragraph_offset-1] != '\n') insert ('\n'); diff --git a/gnu/usr.bin/texinfo/makeinfo/xml.c b/gnu/usr.bin/texinfo/makeinfo/xml.c index 69da60d51ba..94dc91e54d3 100644 --- a/gnu/usr.bin/texinfo/makeinfo/xml.c +++ b/gnu/usr.bin/texinfo/makeinfo/xml.c @@ -1,5 +1,5 @@ /* xml.c -- xml output. - $Id: xml.c,v 1.2 2008/10/08 07:09:37 otto Exp $ + $Id: xml.c,v 1.3 2019/05/27 07:13:38 otto Exp $ Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. @@ -1845,7 +1845,8 @@ xml_begin_index (void) if (xml_index_titles) { /* Remove the final > */ - output_paragraph_offset--; + if (output_paragraph_offset) + output_paragraph_offset--; /* and put ID="node-name"><TITLE>Title</TITLE> */ insert_string (xml_index_titles->title); free (xml_index_titles->title); |