Fix a check of len versus PATH_MAX in function copy_symlink(), to
account for the terminating null byte.
Resolves-Coverity-CID: 1296749
Signed-off-by: Vincent Stehlé <vincent.stehle@freescale.com>
Signed-off-by: David Sterba <dsterba@suse.com>
len = btrfs_file_extent_inline_item_len(leaf,
btrfs_item_nr(path->slots[0]));
- if (len > PATH_MAX) {
+ if (len >= PATH_MAX) {
fprintf(stderr, "Symlink '%s' target length %d is longer than PATH_MAX\n",
fs_name, len);
ret = -1;