OSDN Git Service

fs/ntfs3: Potential NULL dereference in hdr_find_split()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 24 Aug 2021 07:50:15 +0000 (10:50 +0300)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Fri, 27 Aug 2021 14:05:14 +0000 (17:05 +0300)
commit8c83a4851da1c7eda83098ade238665b15774da3
treec77fc57022d29785537bf4effe8fa2499d64afde
parent04810f000afdbdd37825ca7f563f036119422cb7
fs/ntfs3: Potential NULL dereference in hdr_find_split()

The "e" pointer is dereferenced before it has been checked for NULL.
Move the dereference after the NULL check to prevent an Oops.

Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Kari Argillander <kari.argillander@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/index.c