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:
parent
bba2e4c536
commit
19e2f8aa8c
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue