Skip to content

Commit

Permalink
Minor edit
Browse files Browse the repository at this point in the history
  • Loading branch information
apnadkarni committed Sep 29, 2023
1 parent 9fb03c8 commit bd10908
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions generic/tclZipfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
* generic/tclZipfs.c file in the TIP430-enabled Tcl cores.
* compat/tclZipfs.c file in the tclconfig (TEA) file system, for pre-tip430
* projects.
*
* Helpful docs:
* https://pkware.cachefly.net/webdocs/APPNOTE/APPNOTE-6.3.9.TXT
* https://libzip.org/specifications/appnote_iz.txt
*/

#include "tclInt.h"
Expand Down Expand Up @@ -4839,8 +4843,7 @@ InitWritableChannel(
/* TODO - why is the memset necessary? Not cheap for default maxWrite. */
memset(info->ubuf, 0, info->maxWrite);

info->isEncrypted = z->isEncrypted;
if (info->isEncrypted) {
if (z->isEncrypted) {
assert(z->numCompressedBytes >= 12); /* caller should have checked*/
if (DecodeCryptHeader(
interp, z, info->keys, z->zipFilePtr->data + z->offset) !=
Expand Down

0 comments on commit bd10908

Please sign in to comment.