]> git.ipfire.org Git - thirdparty/libarchive.git/commit
Fix archive_wincrypt_version compilation
authorTobias Stoeckmann <tobias@stoeckmann.org>
Fri, 23 May 2025 16:59:05 +0000 (18:59 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Fri, 23 May 2025 17:05:21 +0000 (19:05 +0200)
commit38ac49553d430f1b28c7624e5e9788125fdad187
treed917511411bc33bdbe6a87b64679f8a3bedc381a
parent2961b132d053f4a8eb2723fe9476cf50457f3ea7
Fix archive_wincrypt_version compilation

Cast address of "version" to BYTE pointer for CryptGetProvParam.
Fix "major" variable assignment for picky compilers like MSVC.

The "length" variable is an in/out variable. It must be set to the size
of available memory within "version". Right now it is undefined behavior
and 0 would crash during runtime.

Fixes https://github.com/libarchive/libarchive/issues/2628

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
libarchive/archive_version_details.c