1
0
Fork 0
mirror of https://github.com/pygos/pkg-utils.git synced 2024-12-22 09:50:49 +01:00

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

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);