mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-23 22:53:35 +00:00
btrfs-progs: utils: Fix NULL pointer derefernces in string_is_numerical
In get_running_kernel_version() function, we directly pass return pointer from strtok_r() to string_is_numerical(). Return pointer from strok_r() can be NULL, but string_is_numerical() can't handle it and will cause NULL pointer derefernces. Fix it by check if it's a NULL pointer first. Resolves-Coverity-CID: 1374097 Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
04329d1e77
commit
d6ab2fdca4
Loading…
Reference in New Issue
Block a user