erofs-utils: lib: tar: allow pax headers with empty names
authorGao Xiang <hsiangkao@linux.alibaba.com>
Mon, 9 Sep 2024 09:33:54 +0000 (17:33 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Mon, 9 Sep 2024 11:18:39 +0000 (19:18 +0800)
commit4102c472f214372501ee59fd8c7dccb7f31f03a6
tree5ea44fe6f23f99e1373453c1672da86c1c2c9116
parentff1ca05f60f731b038b9a2515be5c6022f54fb05
erofs-utils: lib: tar: allow pax headers with empty names

Usually, `exthdr.name`s are set as "%d/PaxHeaders.%p/%f" [1].

However, since both `GNU tar` and `bsdtar` can process empty
`exthdr.name`s, let's allow them too.

[1] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html

Reported-by: Colin Walters <walters@verbum.org>
Fixes: 95d315fd7958 ("erofs-utils: introduce tarerofs")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240909093354.1712460-1-hsiangkao@linux.alibaba.com
lib/tar.c