aboutsummaryrefslogtreecommitdiff
path: root/archival/libunarchive
diff options
context:
space:
mode:
Diffstat (limited to 'archival/libunarchive')
-rw-r--r--archival/libunarchive/get_header_tar.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/archival/libunarchive/get_header_tar.c b/archival/libunarchive/get_header_tar.c
index beaf3087f..9134d6db6 100644
--- a/archival/libunarchive/get_header_tar.c
+++ b/archival/libunarchive/get_header_tar.c
@@ -211,9 +211,12 @@ char get_header_tar(archive_handle_t *archive_handle)
211 /* getOctal trashes subsequent field, therefore we call it 211 /* getOctal trashes subsequent field, therefore we call it
212 * on fields in reverse order */ 212 * on fields in reverse order */
213 if (tar.devmajor[0]) { 213 if (tar.devmajor[0]) {
214 char t = tar.prefix[0];
215 /* we trash prefix[0] here, but we DO need it later! */
214 unsigned minor = GET_OCTAL(tar.devminor); 216 unsigned minor = GET_OCTAL(tar.devminor);
215 unsigned major = GET_OCTAL(tar.devmajor); 217 unsigned major = GET_OCTAL(tar.devmajor);
216 file_header->device = makedev(major, minor); 218 file_header->device = makedev(major, minor);
219 tar.prefix[0] = t;
217 } 220 }
218 file_header->link_target = NULL; 221 file_header->link_target = NULL;
219 if (!linkname && parse_names && tar.linkname[0]) { 222 if (!linkname && parse_names && tar.linkname[0]) {