Prevent fs_file NULL pointer dereference in fixfsfile() uncovered after r1.5
when passing damaged user-supplied fstab file data. MFC after: 1 week
This commit is contained in:
parent
5b0da85a41
commit
130b343048
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=233296
@ -91,7 +91,7 @@ fixfsfile()
|
||||
struct stat sb;
|
||||
struct statfs sf;
|
||||
|
||||
if (strcmp(_fs_fstab.fs_file, "/") != 0)
|
||||
if (_fs_fstab.fs_file != NULL &&strcmp(_fs_fstab.fs_file, "/") != 0)
|
||||
return;
|
||||
if (statfs("/", &sf) != 0)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user