isofs: Fix off-by-one in 'session' mount option parsing
authorJan Kara <jack@suse.cz>
Tue, 18 Jul 2017 10:27:56 +0000 (12:27 +0200)
committerJan Kara <jack@suse.cz>
Tue, 18 Jul 2017 10:33:16 +0000 (12:33 +0200)
commit34363c057b368114d8b93376ec6b65ef5f36a55b
tree7108d5e9650581495e1733188f453cec9711aa71
parentfcea8aed91f53b51f9b943dc01f12d8aa666c720
isofs: Fix off-by-one in 'session' mount option parsing

According to ECMA-130 standard maximum valid track number is 99. Since
'session' mount option starts indexing at 0 (and we add 1 to the passed
number), we should refuse value 99. Also the condition in
isofs_get_last_session() unnecessarily repeats the check - remove it.

Reported-by: David Howells <dhowells@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/isofs/inode.c