https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a27f0debca4c0fe8cd916…
commit a27f0debca4c0fe8cd916d2406124f9d30ae5dbe
Author: Joachim Henze <Joachim.Henze(a)reactos.org>
AuthorDate: Tue Sep 15 20:54:50 2020 +0200
Commit: Joachim Henze <Joachim.Henze(a)reactos.org>
CommitDate: Tue Sep 15 20:54:50 2020 +0200
[MMIXER] Fix NULL dereference CORE-17276
This lead to a crash of winmm:mixer
during "GCCLin_x86 on Test VBox".
The crash was exposed when new code paths
were activated by 0.4.15-dev-791-g
6d7ebc20481a587bd19e8a8049317113071b0817
I do intend to port this commit back into 0.4.14RC.
---
sdk/lib/drivers/sound/mmixer/sup.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sdk/lib/drivers/sound/mmixer/sup.c b/sdk/lib/drivers/sound/mmixer/sup.c
index 06f342b12e8..4fa8c080309 100644
--- a/sdk/lib/drivers/sound/mmixer/sup.c
+++ b/sdk/lib/drivers/sound/mmixer/sup.c
@@ -690,6 +690,8 @@ MMixerSetGetVolumeControlDetails(
/* get input */
Input = (LPMIXERCONTROLDETAILS_UNSIGNED)MixerControlDetails->paDetails;
+ if (!Input)
+ return MM_STATUS_UNSUCCESSFUL; /* to prevent dereferencing NULL */
if (bSet)
{