]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5464c5911c2740081de03a89f205e1dccdf351d2
tree7108d5e9650581495e1733188f453cec9711aa71
parent4aecdb39947a11aed1c48bd9316ace944e935fbc
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