Skip to content

Commit

Permalink
Merge pull request #184 from tagoh/issues/181
Browse files Browse the repository at this point in the history
Fix the stack buffer overflow issue
  • Loading branch information
dov committed Feb 17, 2022
2 parents 859aa1b + ad3a19e commit cffa304
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/fribidi-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ FRIBIDI_END_IGNORE_DEPRECATIONS
S_[sizeof (S_) - 1] = 0;
len = strlen (S_);
/* chop */
if (S_[len - 1] == '\n')
if (len > 0 && S_[len - 1] == '\n')
{
len--;
S_[len] = '\0';
Expand Down

0 comments on commit cffa304

Please sign in to comment.