zip.c:3455
IZ_PWLEN is not defined whith NO_CRYPT
When I try to fix it like this:
+#if CRYPT
if (key_needed) {
if ((key = malloc(IZ_PWLEN+1)) == NULL) {
ZIPERR(ZE_MEM, "was getting encryption password");
}
r = encr_passwd(ZP_PW_ENTER, key, IZ_PWLEN+1, zipfile);
if (r != IZ_PW_ENTERED) {
if (r < IZ_PW_ENTERED)
r = ZE_PARMS;
ZIPERR(r, "was getting encryption password");
}
if (*key == '\0') {
ZIPERR(ZE_PARMS, "zero length password not allowed");
}
if ((e = malloc(IZ_PWLEN+1)) == NULL) {
ZIPERR(ZE_MEM, "was verifying encryption password");
}
r = encr_passwd(ZP_PW_VERIFY, e, IZ_PWLEN+1, zipfile);
if (r != IZ_PW_ENTERED && r != IZ_PW_SKIPVERIFY) {
free((zvoid *)e);
if (r < ZE_OK) r = ZE_PARMS;
ZIPERR(r, "was verifying encryption password");
}
r = ((r == IZ_PW_SKIPVERIFY) ? 0 : strcmp(key, e));
free((zvoid *)e);
if (r) {
ZIPERR(ZE_PARMS, "password verification failed");
}
}
+#endif
it fails anyway
i686-pc-linux-gnu-gcc -o zipcloak zipcloak.o zipfile_.o fileio_.o
util_.o globals.o unix_.o crc32_.o crc_i386.o crypt_.o ttyio.o -lbz2
zipfile_.o: In function `zipcopy':
zipfile.c:(.text+0x288c): undefined reference to `zipmessage_nl'
zipfile.c:(.text+0x298b): undefined reference to `zipmessage_nl'
zipfile_.o: In function `readzipfile':
zipfile.c:(.text+0x378e): undefined reference to `zipmessage'
fileio_.o: In function `close_split':
fileio.c:(.text+0x1b20): undefined reference to `zipmessage'
fileio.c:(.text+0x1b3c): undefined reference to `rename_split'
fileio.c:(.text+0x1b44): undefined reference to `set_filetype'
fileio_.o: In function `bfcopy':
fileio.c:(.text+0x3eee): undefined reference to `zipmessage_nl'
But I can not find how it is related to CRYPT/NO_CRYPT