btrfs-progs: utils: do not expect lo_file_name to be null terminated
authorDavid Sterba <dsterba@suse.com>
Fri, 13 Nov 2015 17:20:38 +0000 (18:20 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 Nov 2015 13:23:46 +0000 (14:23 +0100)
commit882f319761ebe0ff17624e6b66ff79270c3c63e5
tree7bf48cc7eb4a015cc283fc70d7ca3c675ebbd136
parent0cf3b78f404b01b6e400fac6eb29890fc430b20e
btrfs-progs: utils: do not expect lo_file_name to be null terminated

The loop_info64::lo_file_name might not be null terminated. Avoid strlen
and trim the length to whatever size of the loop_info buffer.

Signed-off-by: David Sterba <dsterba@suse.com>
utils.c