Fix offset calculation for symbolic links.

This commit is contained in:
Andrew V. Samoilov 2002-06-06 15:16:29 +00:00
parent 64b2eb4db3
commit 1d9879b0be
2 changed files with 3 additions and 1 deletions

View File

@ -2,7 +2,8 @@
* cpio.c (cpio_read_oldc_head): Use char[] for buf instead
of char*[]. Remove unneeded casts. Fix error message.
(cpio_create_entry): G_free name.
(cpio_create_entry): G_free name. Fix offset calculation
for symbolic links.
2002-05-22 Pavel Roskin <proski@gnu.org>

View File

@ -494,6 +494,7 @@ static int cpio_create_entry(vfs *me, vfs_s_super *super, struct stat *stat, cha
return STATUS_EOF;
}
inode->linkname[stat->st_size] = 0; /* Linkname stored without terminating \0 !!! */
CPIO_POS(super) += stat->st_size;
cpio_skip_padding(super);
} else {
CPIO_SEEK_CUR(super, stat->st_size);