udf: Fortify loading of sparing table
authorJan Kara <jack@suse.cz>
Wed, 27 Jun 2012 19:23:07 +0000 (21:23 +0200)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Wed, 16 Jan 2013 21:45:05 +0000 (16:45 -0500)
commit9ae30e324a96d0328a575329d7a95a09b3318601
tree63b06e020083ec6b55d9b115b7a6123e24a2b83b
parent0ccf5700cfba2b986a7a7df39334a6f045df0ada
udf: Fortify loading of sparing table

commit 1df2ae31c724e57be9d7ac00d78db8a5dabdd050 upstream.

Add sanity checks when loading sparing table from disk to avoid accessing
unallocated memory or writing to it.

Signed-off-by: Jan Kara <jack@suse.cz>
[PG: in 2.6.34 udf_err() is called udf_error()]
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
fs/udf/super.c