summaryrefslogtreecommitdiff
path: root/bin/sqfsdiff/node_compare.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-08-16 13:03:17 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-08-16 13:03:17 +0200
commit80fe7f8d5b7dd51c97dd66152e255173f9a516dd (patch)
treea44077829ccee0f6750b9ce1fbf2691219d5edbe /bin/sqfsdiff/node_compare.c
parent1f2342c6e89280a21c2e1c665803aae0e42185cb (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 'bin/sqfsdiff/node_compare.c')
0 files changed, 0 insertions, 0 deletions