Author: janderwald
Date: Wed Jun 9 16:51:16 2010
New Revision: 47715
URL:
http://svn.reactos.org/svn/reactos?rev=47715&view=rev
Log:
[MMIXER]
- Handle failure of device enumeration
- Add sanity check
Modified:
trunk/reactos/lib/drivers/sound/mmixer/controls.c
trunk/reactos/lib/drivers/sound/mmixer/mixer.c
Modified: trunk/reactos/lib/drivers/sound/mmixer/controls.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmixer/c…
==============================================================================
--- trunk/reactos/lib/drivers/sound/mmixer/controls.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/sound/mmixer/controls.c [iso-8859-1] Wed Jun 9 16:51:16
2010
@@ -385,6 +385,8 @@
SrcLine->Line.Target.wPid = MixerInfo->MixCaps.wPid;
SrcLine->Line.Target.vDriverVersion = MixerInfo->MixCaps.vDriverVersion;
InitializeListHead(&SrcLine->LineControlsExtraData);
+
+ ASSERT(MixerInfo->MixCaps.szPname[MAXPNAMELEN-1] == L'\0');
wcscpy(SrcLine->Line.Target.szPname, MixerInfo->MixCaps.szPname);
}
Modified: trunk/reactos/lib/drivers/sound/mmixer/mixer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmixer/m…
==============================================================================
--- trunk/reactos/lib/drivers/sound/mmixer/mixer.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/sound/mmixer/mixer.c [iso-8859-1] Wed Jun 9 16:51:16 2010
@@ -472,6 +472,13 @@
// enumeration has finished
break;
}
+ else
+ {
+ DPRINT1("Failed to enumerate device %lu\n", DeviceIndex);
+
+ // TODO cleanup
+ return Status;
+ }
}
else
{