Bug 254

Summary: One more possible out of bounds error in sb_mixer.c from Stanford Checker
Product: Drivers Reporter: Hanna Linder (hannal)
Component: Sound(OSS)Assignee: Muli Ben-Yehuda (mulix)
Status: CLOSED CODE_FIX    
Severity: low    
Priority: P2    
Hardware: i386   
OS: Linux   
Kernel Version: Subsystem:
Regression: --- Bisected commit-id:
Bug Depends on: 252    
Bug Blocks:    

Description Hanna Linder 2003-01-03 16:51:11 UTC
Exact Kernel version: 2.5.48
Distribution: kernel.org
Hardware Environment: unknown
Software Environment: Stanford Checker
Problem Description:
See thread at: http://marc.theaimsgroup.com/?t=104155440600003&r=1&w=2
[BUG] Look at callstack.
/u1/acc/linux/2.5.48/sound/oss/sb_mixer.c:336:smw_mixer_set:
ERROR:BUFFER:336:336:Array bounds error: smw_mix_regs[17] indexed with [17]
[Callstack: /u1/acc/linux/2.5.48/sound/oss/sb_mixer.c:656:sb_mixer_set(_, 17, _)
-> /u1/acc/linux/2.5.48/sound/oss/sb_mixer.c:369:smw_mixer_set(_, 17, _, 100)] 
			sb_setmixer(devc, 0x0e, val);
		
			break;

		default:

Error --->
			reg = smw_mix_regs[dev];
			if (reg == 0)
				return -EINVAL;
			sb_setmixer(devc, reg, (24 - (24 * left / 100)) | 0x20);	/* 24=mute, 0=max */

Steps to reproduce:
Comment 1 Muli Ben-Yehuda 2004-03-20 13:32:47 UTC
I'm taking care of Bug #252; I'll take care of this as well. 
Comment 2 Muli Ben-Yehuda 2004-03-20 13:33:04 UTC
I'm taking care of Bug #252; I'll take care of this as well.