Re: [Bug-tar] [PATCH] --one-top-level: avoid a heap-buffer-overflow

2018-04-08 Thread Sergey Poznyakoff
Jim Meyering ha escrit: > $ : > k && tar cf k.tar k; valgrind tar --one-top-level -tf k.tar > > Invalid read of size 1 > at 0x421FCF: strip_compression_suffix (suffix.c:107) Thanks for finding that out. However, the proposed fix doesn't seem quite correct to me: > + size_t len = (

[Bug-tar] [PATCH] Fix typos in the documentation

2018-04-08 Thread Daniel Le Duc Khoi Nguyen
Hi maintainers of tar, While going through the tutorials in "info tar", I found some typos which I fixed in the attached patch. Thank you. -- Regards, Daniel From f7c1f5136ee5ae11a82813680bafd3956f340397 Mon Sep 17 00:00:00 2001 From: Daniel Le Date: Sun, 8 Apr 2018 17:06:33 +0800 Subject: [PAT

Re: [Bug-tar] [PATCH] --one-top-level: avoid a heap-buffer-overflow

2018-04-08 Thread Jim Meyering
On Sun, Apr 8, 2018 at 1:53 AM, Sergey Poznyakoff wrote: > Jim Meyering ha escrit: > >> $ : > k && tar cf k.tar k; valgrind tar --one-top-level -tf k.tar >> >> Invalid read of size 1 >> at 0x421FCF: strip_compression_suffix (suffix.c:107) > > Thanks for finding that out. However, the pro

Re: [Bug-tar] [PATCH] --one-top-level: avoid a heap-buffer-overflow

2018-04-08 Thread Jim Meyering
On Sun, Apr 8, 2018 at 11:16 AM, Jim Meyering wrote: > On Sun, Apr 8, 2018 at 1:53 AM, Sergey Poznyakoff 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" o

Re: [Bug-tar] [PATCH] --one-top-level: avoid a heap-buffer-overflow

2018-04-08 Thread Marius Spix
What is in the case that the suffix is not 3 characters long, e. g. ".tz" or ".tbz2"? On Sun, 8 Apr 2018 12:34:40 -0700 Jim Meyering wrote: > On Sun, Apr 8, 2018 at 11:16 AM, Jim Meyering > wrote: > > On Sun, Apr 8, 2018 at 1:53 AM, Sergey Poznyakoff > > wrote: > ... > > I see what you mean. S

Re: [Bug-tar] [PATCH] --one-top-level: avoid a heap-buffer-overflow

2018-04-08 Thread Jim Meyering
On Sun, Apr 8, 2018 at 2:55 PM, Marius Spix 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 i