Skip to content

Commit

Permalink
termptyesc: fix bug found by tyfuzz
Browse files Browse the repository at this point in the history
  • Loading branch information
borisfaure committed Oct 17, 2018
1 parent 5e06ee1 commit df81992
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/bin/termptyesc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1840,6 +1840,12 @@ _handle_hyperlink(Termpty *ty,

/* /!\ we expect ';' and ':' to be escaped in params */
end = memchr(s+1, ';', len);
if (!end)
{
ERR("invalid hyperlink escape code: missing ';'"
" (len:%d s:%.*s)", len, len, s);
goto end;
}
*end = '\0';
do
{
Expand Down

0 comments on commit df81992

Please sign in to comment.