aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/copyin.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/copyin.c b/src/copyin.c
index 042cc41..264bfcb 100644
--- a/src/copyin.c
+++ b/src/copyin.c
@@ -138,7 +138,7 @@ get_link_name (struct cpio_file_stat *file_hdr, int in_file_des)
}
else
{
- link_name = xmalloc (file_hdr->c_filesize);
+ link_name = xmalloc (file_hdr->c_filesize + 1);
tape_buffered_read (link_name, in_file_des, file_hdr->c_filesize);
link_name[file_hdr->c_filesize] = '\0';
tape_skip_padding (in_file_des, file_hdr->c_filesize);

Return to:

Send suggestions and report system problems to the System administrator.