diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2016-10-24 10:43:34 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-11-23 10:48:13 +0100 |
commit | d6ab2fdca495b98e497f21f277dadba834e2199b (patch) | |
tree | 5263f35efe13b239034b3bfddebab8b770e3a29f /rbtree-utils.h | |
parent | 04329d1e772d28cbbb4dcfbc89ffa41dbc802ca1 (diff) |
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>
Diffstat (limited to 'rbtree-utils.h')
0 files changed, 0 insertions, 0 deletions