Skip to content

Commit

Permalink
texinfo filter: fix buffer overflow
Browse files Browse the repository at this point in the history
Bug found using OSS-Fuzz.
  • Loading branch information
kevina committed Dec 22, 2019
1 parent 40c0207 commit 8d964a0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/filter/texinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ namespace {

} else if (!seen_input && *cur == '\\' && stop - cur >= 6
&& cur[1] == 'i' && cur[2] == 'n' && cur[3] == 'p'
&& cur[4] == 'u' && cur[5] == 't') {
&& cur[4] == 'u' && cur[5] == 't' /* i.e '\input' */) {

last_command.clear();
for (int i = 0; i != 6; ++i)
Expand All @@ -170,7 +170,6 @@ namespace {
++ignore;
in_line_command = true;
seen_input = true;
++cur;

} else if (last_command == "end") {

Expand Down

0 comments on commit 8d964a0

Please sign in to comment.