Fix file list removal of input line

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
This commit is contained in:
David Oberhollenzer 2019-03-09 14:57:33 +01:00
parent bba2e4c536
commit 19e2f8aa8c
1 changed files with 2 additions and 1 deletions

View File

@ -17,6 +17,7 @@ static image_entry_t *filelist_mkentry(char *line, const char *filename,
size_t linenum, mode_t filetype)
{
image_entry_t *ent;
char *start = line;
size_t i;
ent = calloc(1, sizeof(*ent));
@ -117,7 +118,7 @@ static image_entry_t *filelist_mkentry(char *line, const char *filename,
line = skipspace(line);
/* remove processed data */
memmove(line, line, strlen(line) + 1);
memmove(start, line, strlen(line) + 1);
return ent;
fail:
free(ent->name);