Re: [hackers] [sbase][PATCH v3] tar: sanitize, chktar: leading spaces should be skipped over

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Tue, 5 Mar 2024 13:26:35 +0100

Hi,

On Sun, Feb 11, 2024 at 09:26:14AM +0100, Elie Le Vaillant wrote:
> Some tar archives (eg. ftp://ftp.gnu.org/gnu/shtool/shtool-2.0.8.tar.gz)
> use leading spaces instead of leading zeroes for numeric fields.
> Although it is not allowed by the ustar specification, most tar
> implementations recognize it as correct. But since 3ef6d4e4, we
> replace all spaces by NULs here, not just trailing ones, which leads to
> recognizing such archives as malformed. This fixes it: we now skip
> over leading spaces, allowing strtol(3) to read those numeric fields.

Applied, thanks.
Received on Tue Mar 05 2024 - 13:26:35 CET

This archive was generated by hypermail 2.3.0 : Tue Mar 05 2024 - 13:36:36 CET