bug-tar
[Top][All Lists]
Advanced

[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: Sun, 8 Apr 2018 17:41:15 -0700

On Sun, Apr 8, 2018 at 2:55 PM, Marius Spix <address@hidden> wrote:
> What is in the case that the suffix is not 3 characters long, e. g.
> ".tz" or ".tbz2"?

That is already handled by the find_compression_suffix call. It sets
"len" to the length not including that trailing suffix. What we're
talking about here is whether to remove even more (the ".tar"), that
was just before that trailing suffix. E.g., given a.tar.gz, we want to
return "a". But find_compression_suffix declares that it has found a
suffix also for ".tar" and composite ones like ".tgz", and for those,
it seems wrong to strip any additional (prior) ".tar".



reply via email to

[Prev in Thread] Current Thread [Next in Thread]