Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Paste
P371
Masterwork From Distant Lands
Active
Public
Actions
Authored by
cem
on Mar 10 2020, 7:13 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Flag For Later
Award Token
Tags
None
Referenced Files
F6241554: raw.txt
Mar 10 2020, 7:13 PM
2020-03-10 19:13:46 (UTC+0)
Subscribers
None
diff --git a/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c b/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c
index ec29c5c418e4..aca51da76017 100644
--- a/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c
+++ b/contrib/libarchive/libarchive/archive_write_set_format_gnutar.c
@@ -634,8 +634,8 @@ archive_format_gnutar_header(struct archive_write *a, char h[512],
memcpy(h + GNUTAR_gname_offset, p, copy_length);
}
- /* By truncating the mode here, we ensure it always fits. */
- format_octal(archive_entry_mode(entry) & 07777,
+ /* GNU tar mode allows base-256, all 16-bit mode_t values fit. */
+ format_number(archive_entry_mode(entry),
h + GNUTAR_mode_offset, GNUTAR_mode_size);
/* GNU tar supports base-256 here, so should never overflow. */
Event Timeline
cem
edited the content of this paste.
(Show Details)
Mar 10 2020, 7:13 PM
2020-03-10 19:13:46 (UTC+0)
cem
changed the title of this paste from untitled to
Masterwork From Distant Lands
.
Log In to Comment