Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
DVR: fix possible wrong memory access in pvr_generate_filename()
  • Loading branch information
perexg committed Sep 10, 2015
1 parent cda471e commit 3b46b66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dvr/dvr_rec.c
Expand Up @@ -585,7 +585,7 @@ pvr_generate_filename(dvr_entry_t *de, const streaming_start_t *ss)
while (*s == '/')
s++;
j = strlen(s);
while (j >= 0 && s[j-1] == '/')
while (j > 0 && s[j-1] == '/')
j--;
s[j] = '\0';
snprintf(path + l, sizeof(path) - l, "%s", s);
Expand Down

0 comments on commit 3b46b66

Please sign in to comment.