Module Name: src
Committed By: rin
Date: Fri Jun 5 12:47:28 UTC 2020
Modified Files:
src/external/gpl2/texinfo/dist/makeinfo: html.c
Log Message:
Check x > 0 *before*, not after, using (x - 1) as index of array.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 src/external/gpl2/texinfo/dist/makeinfo/html.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl2/texinfo/dist/makeinfo/html.c
diff -u src/external/gpl2/texinfo/dist/makeinfo/html.c:1.1.1.1 src/external/gpl2/texinfo/dist/makeinfo/html.c:1.2
--- src/external/gpl2/texinfo/dist/makeinfo/html.c:1.1.1.1 Thu Jan 14 00:11:29 2016
+++ src/external/gpl2/texinfo/dist/makeinfo/html.c Fri Jun 5 12:47:28 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: html.c,v 1.1.1.1 2016/01/14 00:11:29 christos Exp $ */
+/* $NetBSD: html.c,v 1.2 2020/06/05 12:47:28 rin Exp $ */
/* html.c -- html-related utilities.
Id: html.c,v 1.28 2004/12/06 01:13:06 karl Exp
@@ -447,7 +447,7 @@ rollback_empty_tag (char *tag)
return 0;
/* Find the end of the previous tag. */
- while (output_paragraph[check_position-1] != '>' && check_position > 0)
+ while (check_position > 0 && output_paragraph[check_position-1] != '>')
check_position--;
/* Save stuff between tag's end to output_paragraph's end. */
@@ -464,7 +464,7 @@ rollback_empty_tag (char *tag)
}
/* Find the start of the previous tag. */
- while (output_paragraph[check_position-1] != '<' && check_position > 0)
+ while (check_position > 0 && output_paragraph[check_position-1] != '<')
check_position--;
/* Check to see if this is the tag. */