diff options
author | Tim Kientzle <kientzle@gmail.com> | 2011-02-11 01:46:54 -0500 |
---|---|---|
committer | Tim Kientzle <kientzle@gmail.com> | 2011-02-11 01:46:54 -0500 |
commit | 465bb5e51bdd609c95e802b43625c5911b1ee500 (patch) | |
tree | 2cf6c40262bb96fb3184d9bb9dad6f40a1e33b5f | |
parent | 6ac2c3211400d36682690fc5f83e9a83faf81b20 (diff) | |
download | libarchive-465bb5e51bdd609c95e802b43625c5911b1ee500.tar.gz |
If no name is available, don't store one.
SVN-Revision: 2961
-rw-r--r-- | libarchive/archive_write_set_format_ustar.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libarchive/archive_write_set_format_ustar.c b/libarchive/archive_write_set_format_ustar.c index f17aa3ae..58e68fa7 100644 --- a/libarchive/archive_write_set_format_ustar.c +++ b/libarchive/archive_write_set_format_ustar.c @@ -279,7 +279,9 @@ __archive_write_format_header_ustar(struct archive_write *a, char h[512], */ pp = archive_entry_pathname(entry); - if (strlen(pp) <= USTAR_name_size) + if (pp == NULL) { + /* Yuck. */ + } else if (strlen(pp) <= USTAR_name_size) memcpy(h + USTAR_name_offset, pp, strlen(pp)); else { /* Store in two pieces, splitting at a '/'. */ |