https://git.reactos.org/?p=reactos.git;a=commitdiff;h=355700f45a42db5d14d05…
commit 355700f45a42db5d14d051a9266003c26525b1da
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Sat Feb 1 12:40:23 2020 +0100
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sat Feb 8 13:08:27 2020 +0100
[MMIXER] Safely handle MMixerGetDeviceNameWithComponentId failure in
MMixerInitializeFilter. CORE-16611
---
sdk/lib/drivers/sound/mmixer/controls.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sdk/lib/drivers/sound/mmixer/controls.c
b/sdk/lib/drivers/sound/mmixer/controls.c
index 376a443a7a8..684a44b37ab 100644
--- a/sdk/lib/drivers/sound/mmixer/controls.c
+++ b/sdk/lib/drivers/sound/mmixer/controls.c
@@ -1559,6 +1559,10 @@ MMixerInitializeFilter(
{
/* try get name with component id */
Status = MMixerGetDeviceNameWithComponentId(MixerContext,
MixerData->hDevice, MixerInfo->MixCaps.szPname);
+ if (Status != MM_STATUS_SUCCESS)
+ {
+ MixerInfo->MixCaps.szPname[0] = L'\0';
+ }
}
/* initialize line list */