Dan Kegel : winealsa.drv: Don't return garbage if can't find active channel .
Alexandre Julliard
julliard at winehq.org
Mon Jan 14 09:33:14 CST 2008
Module: wine
Branch: master
Commit: 3c070b22ef6ea1b16fbb3cd9f9391d132129df85
URL: http://source.winehq.org/git/wine.git/?a=commit;h=3c070b22ef6ea1b16fbb3cd9f9391d132129df85
Author: Dan Kegel <dank at kegel.com>
Date: Sun Jan 13 22:51:24 2008 -0800
winealsa.drv: Don't return garbage if can't find active channel.
---
dlls/winealsa.drv/mixer.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/winealsa.drv/mixer.c b/dlls/winealsa.drv/mixer.c
index fb989dc..cc38f8f 100644
--- a/dlls/winealsa.drv/mixer.c
+++ b/dlls/winealsa.drv/mixer.c
@@ -985,6 +985,12 @@ static DWORD MIX_GetControlDetails(UINT wDevID, LPMIXERCONTROLDETAILS mctrld, DW
break;
}
+ if (chn > SND_MIXER_SCHN_LAST)
+ {
+ TRACE("can't find active channel\n");
+ return MMSYSERR_INVALPARAM; /* fixme: what's right error? */
+ }
+
mcdb->fValue = !ival;
TRACE("=> %s\n", mcdb->fValue ? "on" : "off");
return MMSYSERR_NOERROR;
More information about the wine-cvs
mailing list