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:
1 file changed
+6
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user