Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=951744fea0aea9adbd7c8cacb3605f2d69a66f96 Commit: 951744fea0aea9adbd7c8cacb3605f2d69a66f96 Parent: 31170b6ad4ebe6c43c1cc3b8112274cf59474de0 Author: Dmitriy Monakhov <[EMAIL PROTECTED]> AuthorDate: Tue May 8 00:35:22 2007 -0700 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Tue May 8 11:15:22 2007 -0700
udf: possible null pointer dereference while load_partition sb_read may return NULL, let's explicitly check it. Signed-off-by: Dmitriy Monakhov <[EMAIL PROTECTED]> Cc: Jan Kara <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- fs/udf/super.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/fs/udf/super.c b/fs/udf/super.c index a92daab..9b8644a 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -1403,6 +1403,8 @@ udf_load_partition(struct super_block *sb, kernel_lb_addr *fileset) pos = udf_block_map(UDF_SB_VAT(sb), 0); bh = sb_bread(sb, pos); + if (!bh) + return 1; UDF_SB_TYPEVIRT(sb,i).s_start_offset = le16_to_cpu(((struct virtualAllocationTable20 *)bh->b_data + udf_ext0_offset(UDF_SB_VAT(sb)))->lengthHeader) + udf_ext0_offset(UDF_SB_VAT(sb)); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html