From: Konstantin Komarov Date: Tue, 26 Sep 2023 08:19:08 +0000 (+0300) Subject: fs/ntfs3: Fix possible NULL-ptr-deref in ni_readpage_cmpr() X-Git-Tag: v6.6-rc7~33^2~6 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=32e9212256b88f35466642f9c939bb40cfb2c2de;p=linux-block.git fs/ntfs3: Fix possible NULL-ptr-deref in ni_readpage_cmpr() Signed-off-by: Konstantin Komarov --- diff --git a/fs/ntfs3/frecord.c b/fs/ntfs3/frecord.c index d49fbb22bd5e..dad976a68985 100644 --- a/fs/ntfs3/frecord.c +++ b/fs/ntfs3/frecord.c @@ -2148,7 +2148,7 @@ out1: for (i = 0; i < pages_per_frame; i++) { pg = pages[i]; - if (i == idx) + if (i == idx || !pg) continue; unlock_page(pg); put_page(pg);