[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] [PATCH] --one-top-level: avoid a heap-buffer-overflow
From: |
Jim Meyering |
Subject: |
Re: [Bug-tar] [PATCH] --one-top-level: avoid a heap-buffer-overflow |
Date: |
Mon, 9 Apr 2018 22:30:35 -0700 |
On Sun, Apr 8, 2018 at 12:34 PM, Jim Meyering <address@hidden> wrote:
> On Sun, Apr 8, 2018 at 11:16 AM, Jim Meyering <address@hidden> wrote:
>> On Sun, Apr 8, 2018 at 1:53 AM, Sergey Poznyakoff <address@hidden> wrote:
> ...
>> I see what you mean. So how would you like a NAME of "a.tar.tar" to be
>> treated? Seems wrong to remove the second .tar suffix. How about this
>> change, to make it remove ".tar" only if the just-stripped suffix is
>> not also ".tar"?
>
> After writing that, I realized that perhaps we should treat a name
> like "foo.tar.tgz" (whose final suffix begins with ".t") like
> "foo.tar.tar", i.e., in preserving the nested ".tar" component. WDYT?
Along those lines, here's a revised patch:
tar-suffix-v3.diff
Description: Binary data