]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Update archive_entry_link_resolver to copy the "wide" pathname for hardlinks on Windo...
authorDuncan Horn <40036384+dunhor@users.noreply.github.com>
Tue, 11 Jun 2024 04:23:13 +0000 (21:23 -0700)
committerGitHub <noreply@github.com>
Tue, 11 Jun 2024 04:23:13 +0000 (21:23 -0700)
commit13afc8cbde82b559f15f7d70c3d55a89f7425d01
tree724806ca95aa78a4d7560e606c0c95368b6695a2
parent3f3b3efec27ef8c9587b5c725345ff235b98820a
Update archive_entry_link_resolver to copy the "wide" pathname for hardlinks on Windows (#2225)

On Windows, if you are using `archive_entry_link_resolver` and give it
an entry that links to past entry whose pathname was set using a "wide"
string that cannot be represented by the current locale (i.e. WCS -> MBS
conversion fails), this code will crash due to a null pointer read. This
updates to use the `_w` function instead on Windows.

Note: this is a partial cherry-pick from
https://github.com/libarchive/libarchive/pull/2095, which I'm going to
go through and break into smaller pieces in hopes of getting some things
in while discussion of other things can continue.
libarchive/archive_entry_link_resolver.c
libarchive/test/test_link_resolver.c