[llvm] r291340 - TarWriter: Use Ustar header's "prefix" field to store long filenames.
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 9 12:58:21 PST 2017
> +// Returns true if a given path can be stored to a Ustar header
> +// without the PAX extension.
> +static bool fitInUstar(StringRef Path) {
> + StringRef Prefix;
> + StringRef Name;
> + std::tie(Prefix, Name) = splitPath(Path);
> + return Name.size() <= sizeof(UstarHeader::Name);
Don't you have to check sizeof(UstarHeader::Prefix) too?
Cheers,
Rafael
More information about the llvm-commits
mailing list