Tcl Library Source Code

View Ticket
Login
Ticket UUID: deef12251a28b85978959a2a6ae03514f24395bc
Title: Depending on input file, zipfile:mkzip::mkzip may raise error
Type: Bug Version: trunk
Submitter: pointsman Created on: 2016-02-03 15:17:49
Subsystem: zip Assigned To: hypnotoad
Priority: 7 High Severity: Severe
Status: Open Last Modified: 2016-02-25 06:24:02
Resolution: None Closed By: nobody
    Closed on:
Description:
Due to the behaviour of the zlib core cmd documented by 
http://core.tcl.tk/tcl/tktview/25842c161fd621d8d111430a3637688f55aeaa94 the tcllib cmd zipfile:mkzip::mkzip may raise error, depending on the data to process. (In fact, I got bitten by this in the wild.)

Even if the zlib behaviour is changed to do nothing, gracefully in this case (which seems sensible for me) the mkzip cmd code should protect against this for tcllib compatibility with older 8.6 versions.

The fix should be obviously: Check for zero length input to [$zlib put] in proc ::zipfile::mkzip::add_file_to_archive
User Comments: aku added on 2016-02-25 06:24:02:
Sean, this seems to be yours.