diff options
Diffstat (limited to 'sys-apps/texinfo/files/texinfo-4.8-bounds-check.patch')
-rw-r--r-- | sys-apps/texinfo/files/texinfo-4.8-bounds-check.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sys-apps/texinfo/files/texinfo-4.8-bounds-check.patch b/sys-apps/texinfo/files/texinfo-4.8-bounds-check.patch new file mode 100644 index 000000000000..48176af4f321 --- /dev/null +++ b/sys-apps/texinfo/files/texinfo-4.8-bounds-check.patch @@ -0,0 +1,32 @@ +http://bugs.gentoo.org/140902 + +revision 1.30 +date: 2005-04-05 17:04:16 -0400; author: karl; state: Exp; lines: +6 -4 +negative array indexing, grep -c for tests + +Index: makeinfo/html.c +=================================================================== +RCS file: /cvsroot/texinfo/texinfo/makeinfo/html.c,v +retrieving revision 1.29 +retrieving revision 1.30 +diff -u -p -r1.29 -r1.30 +--- makeinfo/html.c 12 Mar 2005 23:59:39 -0000 1.29 ++++ makeinfo/html.c 5 Apr 2005 21:04:16 -0000 1.30 +@@ -448,7 +450,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. */ +@@ -465,7 +467,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. */ |