diff options
Diffstat (limited to 'fs/isofs/inode.c')
-rw-r--r-- | fs/isofs/inode.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 8cf898a59730..217a5e7815da 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c | |||
@@ -410,7 +410,11 @@ static int parse_options(char *options, struct iso9660_options *popt) | |||
410 | if (match_int(&args[0], &option)) | 410 | if (match_int(&args[0], &option)) |
411 | return 0; | 411 | return 0; |
412 | n = option; | 412 | n = option; |
413 | if (n > 99) | 413 | /* |
414 | * Track numbers are supposed to be in range 1-99, the | ||
415 | * mount option starts indexing at 0. | ||
416 | */ | ||
417 | if (n >= 99) | ||
414 | return 0; | 418 | return 0; |
415 | popt->session = n + 1; | 419 | popt->session = n + 1; |
416 | break; | 420 | break; |
@@ -543,7 +547,7 @@ static unsigned int isofs_get_last_session(struct super_block *sb, s32 session) | |||
543 | 547 | ||
544 | vol_desc_start=0; | 548 | vol_desc_start=0; |
545 | ms_info.addr_format=CDROM_LBA; | 549 | ms_info.addr_format=CDROM_LBA; |
546 | if(session >= 0 && session <= 99) { | 550 | if (session > 0) { |
547 | struct cdrom_tocentry Te; | 551 | struct cdrom_tocentry Te; |
548 | Te.cdte_track=session; | 552 | Te.cdte_track=session; |
549 | Te.cdte_format=CDROM_LBA; | 553 | Te.cdte_format=CDROM_LBA; |