mirror of
https://git.proxmox.com/git/pve-common
synced 2025-08-02 19:59:47 +00:00
getxattr: trim the returned buffer to the correct size
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
7b6b494fff
commit
d9339d016a
@ -1880,6 +1880,7 @@ sub getxattr($$;$) {
|
||||
if ($xattr_size < 0) {
|
||||
return undef;
|
||||
}
|
||||
$buf = substr($buf, 0, $xattr_size);
|
||||
return wantarray ? ($buf, $xattr_size) : $buf;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user