summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2024-02-14 12:32:47 +0300
committerDavid Sterba <dsterba@suse.com>2024-03-04 18:24:52 +0300
commit5ab2b180884c2b8e6fc923cd2a0aa5c744f45eec (patch)
treeba59cd72e37b401349334e4b0859e574752025e1 /scripts/gdb/linux/utils.py
parentf33163ee4c9b6dc0e94857f9912af11ac1fc7845 (diff)
downloadlinux-5ab2b180884c2b8e6fc923cd2a0aa5c744f45eec.tar.xz
btrfs: factor out validation of btrfs_ioctl_vol_args::name
The validation of vol args name in several ioctls is not done properly. a terminating NUL is written to the end of the buffer unconditionally, assuming that this would be the last place in case the buffer is used completely. This does not communicate back the actual error (either an invalid or too long path). Factor out all such cases and use a helper to do the verification, simply look for NUL in the buffer. There's no expected practical change, the size of buffer is 4088, this is enough for most paths or names. Reviewed-by: Boris Burkov <boris@bur.io> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions