Tcl Library Source Code

View Ticket
Login
Ticket UUID: 6b7aa0aecca6fdce12589884c3c9ea2b50c92ad4
Title: tar::skip silently truncates skip length to 65536
Type: Bug Version: 1.15
Submitter: pooryorick Created on: 2013-11-16 07:18:24
Subsystem: tar Assigned To: aku
Priority: 5 Medium Severity: Important
Status: Closed Last Modified: 2024-06-10 06:16:52
Resolution: Fixed Closed By: aku
    Closed on: 2013-11-23 00:25:11
Description:
For some reason, there is  a line in tar::skip that silently truncates skip length to 65536.  This causes failures for tar files like, e.g., obst-3.4.3.tar.gz (find it at http://wiki.tcl.tk/7109).

patch and the start of a test suite in pyk-tar branch
User Comments: aku added on 2013-11-23 00:25:11:
Fixed in revision [4a2f75b5da].
All synced up at  [2917507b22].
Committed.
Pushed.

The work done on branch pyk-tar, mostly by the submitter (pooryorick), with me straightening a few things a bit after.

The issue was actually not the limit itself, but how the code mishandled read results and short reads after that. The bug is fixed with the per-round limit reinstated. The limit is present to keep the memory usage within reasonable bounds, as the code has to read the data into memory to skip over it without seeking. Without limits we may run into memory issues, be it swapping, or just running out.