projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31170b6
)
udf: possible null pointer dereference while load_partition
author
Dmitriy Monakhov
<
[email protected]
>
Tue, 8 May 2007 07:35:22 +0000
(
00:35
-0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 8 May 2007 18:15:22 +0000
(11:15 -0700)
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
patch
|
blob
|
history
diff --git
a/fs/udf/super.c
b/fs/udf/super.c
index a92daaba6c4c0b9db5d7d0cbf902126aa9b6aa88..9b8644a06e53b98f257a54198abb8894abbab85d 100644
(file)
--- 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));