Merge pull request #3266 from datauwu/pax-fix-oob-read

pax: fix 1-byte OOB read in sparse name building
This commit is contained in:
Dustin L. Howett authored and GitHub committed 2026-07-08 22:26:06 -05:00
commit 1e48c53e9e
1 file changed
+6 -1
+6 -1
View File
@@ -1794,7 +1794,12 @@ build_gnu_sparse_name(char *dest, const char *src)
}
/* General case: build a ustar-compatible name adding
* "/GNUSparseFile/". */
* "/GNUSparseFile.0/". */
if (p == src) {
strcpy(dest, "/GNUSparseFile.0/rootdir");
return (dest);
}
build_ustar_entry_name(dest, src, p - src, "GNUSparseFile.0");
return (dest);