aboutsummaryrefslogtreecommitdiff
path: root/archival/libunarchive/get_header_ar.c
diff options
context:
space:
mode:
Diffstat (limited to 'archival/libunarchive/get_header_ar.c')
-rw-r--r--archival/libunarchive/get_header_ar.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/archival/libunarchive/get_header_ar.c b/archival/libunarchive/get_header_ar.c
index 1618b767f..f172fa7c9 100644
--- a/archival/libunarchive/get_header_ar.c
+++ b/archival/libunarchive/get_header_ar.c
@@ -91,8 +91,7 @@ file_header_t *get_header_ar(FILE *src_stream)
}
} else {
/* short filenames */
- typed->name = xcalloc(1, 16);
- strncpy(typed->name, ar.formated.name, 16);
+ typed->name = xstrndup(ar.formated.name, 16);
}
typed->name[strcspn(typed->name, " /")]='\0';