Skip to content

Commit

Permalink
fixed #2520
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanlf committed Jul 6, 2023
1 parent f24227d commit 64201a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/media_tools/vobsub.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,15 @@ static char *strtrim(char *str)

GF_Err vobsub_read_idx(FILE *file, vobsub_file *vobsub, s32 *version)
{
char strbuf[256];
char strbuf[257];
char *str, *pos, *entry;
s32 line, id =-1, delay = 0;
Bool error = 0;

for (line = 0; !error && gf_fgets(strbuf, sizeof(strbuf), file); line++)
for (line = 0; !error && gf_fgets(strbuf, 256, file); line++)
{
//make sure we are null-terminated - cf #2520
strbuf[256]=0;
str = strtrim(strbuf);

if (line == 0)
Expand Down

0 comments on commit 64201a2

Please sign in to comment.