diff --git a/lib/libarchive/archive_entry.c b/lib/libarchive/archive_entry.c index f0f0042f4e87..b4b743530fb4 100644 --- a/lib/libarchive/archive_entry.c +++ b/lib/libarchive/archive_entry.c @@ -575,7 +575,8 @@ archive_entry_set_link(struct archive_entry *entry, const char *target) if (entry->ae_symlink.aes_mbs != NULL || entry->ae_symlink.aes_wcs != NULL) aes_set_mbs(&entry->ae_symlink, target); - aes_set_mbs(&entry->ae_hardlink, target); + else + aes_set_mbs(&entry->ae_hardlink, target); } void