List Archive


Thread Index


From: Andrew Molyneux <>
To: Thomas Klausner <>
Subject: Re: Winzip AES support committed
Date: Fri, 23 Dec 2016 12:39:31 +0000

On 16 December 2016 at 15:17, Thomas Klausner <> wrote:
> Hi!
> We've just committed support for Winzip AES encryption. This is the
> AES encryption version that's supported by 7zip and Winzip.
> Use the new function zip_file_set_encryption() to encrypt files, and
> zip_fopen_encrypted() for decrypting files. You can also provide an
> archive-wide password with zip_set_password() for both encryption and
> decryption.
> Windows support is missing a part for encryption: Can someone please
> fill in lib/zip_random_windows.c with code to provide random bytes?
> Let us know if you find any problems.
> Cheers,
>  Thomas & Dillo

Hi all,

I've just started looking at this, and I've spotted an issue building
libzip with MSVC. In zip_source_read.c there's pointer arithmetic on
"void *", which works when compiling with GCC due to an extension, but
I don't believe is permitted by any C standard. MSVC certainly doesn't
like it. I've attached a fairly trivial patch for that. Maybe also
consider using the GCC flag -Wpointer-arith to warn in case that
creeps in again?


Attachment: msvc_pointer_arith_fix.patch
Description: Binary data

Made by MHonArc.