diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-08-16 13:03:17 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-08-16 13:03:17 +0200 |
commit | 80fe7f8d5b7dd51c97dd66152e255173f9a516dd (patch) | |
tree | a44077829ccee0f6750b9ce1fbf2691219d5edbe /tests/tar/CREDITS | |
parent | 1f2342c6e89280a21c2e1c665803aae0e42185cb (diff) |
Fix libtar treatment of link targets that fill the header field
The tar header has a 100 byte field for symlink and hard link targets.
If the target is longer than 100 bytes, an extension header has to be
used.
However, it is perfectly valid to fill all 100 bytes to the brim
without adding a null terminator. In case of a symlink, this can
result in garbage link targets, while for hard links it results in
an immediate error since the target cannot be resolved later on.
This commit attempts to fix the problem by replacing the strdup of
the link target with an strndup that copies at most the size of the
target header field.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/tar/CREDITS')
0 files changed, 0 insertions, 0 deletions