isofs: Fix unchecked printing of ER records
authorJan Kara <jack@suse.cz>
Thu, 18 Dec 2014 16:26:10 +0000 (17:26 +0100)
committerJan Kara <jack@suse.cz>
Fri, 19 Dec 2014 10:29:24 +0000 (11:29 +0100)
commit4e2024624e678f0ebb916e6192bd23c1f9fdf696
tree0dcfd88ac8290d56563d4a9feb973e6eb83534e4
parent44e8967d591686463e84a88b46b03beba3ab49fb
isofs: Fix unchecked printing of ER records

We didn't check length of rock ridge ER records before printing them.
Thus corrupted isofs image can cause us to access and print some memory
behind the buffer with obvious consequences.

Reported-and-tested-by: Carl Henrik Lunde <chlunde@ping.uio.no>
CC: stable@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
fs/isofs/rock.c