mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Updated ml-patches patchset
This commit is contained in:
parent
9d12bd013b
commit
f7210fb07e
@ -1,21 +1,22 @@
|
||||
From 5fa2778cf0726855905b3318b115a05fd2ced4a4 Mon Sep 17 00:00:00 2001
|
||||
From 65af7470de21a5d3b99ed8bc96f57d3f93012b56 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Maurer <dark.shadow4@web.de>
|
||||
Date: Thu, 2 Aug 2018 17:33:43 +0200
|
||||
Date: Fri, 3 Aug 2018 07:55:03 -0500
|
||||
Subject: [PATCH] winmm: Don't crash in waveOutOpen when nSamplesPerSec is 0
|
||||
and add tests
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45530
|
||||
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
|
||||
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
|
||||
---
|
||||
dlls/winmm/tests/wave.c | 20 ++++++++++++++++++++
|
||||
dlls/winmm/tests/wave.c | 22 ++++++++++++++++++++++
|
||||
dlls/winmm/waveform.c | 7 +++++++
|
||||
2 files changed, 27 insertions(+)
|
||||
2 files changed, 29 insertions(+)
|
||||
|
||||
diff --git a/dlls/winmm/tests/wave.c b/dlls/winmm/tests/wave.c
|
||||
index b402e21..e490040 100644
|
||||
index b402e21917..c106594b3f 100644
|
||||
--- a/dlls/winmm/tests/wave.c
|
||||
+++ b/dlls/winmm/tests/wave.c
|
||||
@@ -1415,6 +1415,26 @@ static void wave_out_test_device(UINT_PTR device)
|
||||
@@ -1415,6 +1415,28 @@ static void wave_out_test_device(UINT_PTR device)
|
||||
} else
|
||||
trace("waveOutOpen(%s): 32 bit float samples not supported\n",
|
||||
dev_name(device));
|
||||
@ -31,19 +32,21 @@ index b402e21..e490040 100644
|
||||
+ format.cbSize = 0;
|
||||
+
|
||||
+ format.nAvgBytesPerSec = 0;
|
||||
+ rc = waveOutOpen(&wout, 0, &format, 0, 0, 0);
|
||||
+ ok(rc == MMSYSERR_NOERROR, "Got %d\n", rc);
|
||||
+ rc = waveOutOpen(&wout, device, &format, 0, 0, 0);
|
||||
+ ok(rc == MMSYSERR_NOERROR,
|
||||
+ "waveOutOpen(%s): returned %s\n",dev_name(device),wave_out_error(rc));
|
||||
+ waveOutClose(wout);
|
||||
+ format.nAvgBytesPerSec = 11025 * 1;
|
||||
+
|
||||
+ format.nSamplesPerSec = 0;
|
||||
+ rc = waveOutOpen(&wout, 0, &format, 0, 0, 0);
|
||||
+ ok(rc == MMSYSERR_INVALPARAM || rc == WAVERR_BADFORMAT, "Got %d\n", rc); /* XP and lower return WAVERR_BADFORMAT */
|
||||
+ rc = waveOutOpen(&wout, device, &format, 0, 0, 0);
|
||||
+ ok(rc == MMSYSERR_INVALPARAM || rc == WAVERR_BADFORMAT, /* XP and lower return WAVERR_BADFORMAT */
|
||||
+ "waveOutOpen(%s): returned %s\n",dev_name(device),wave_out_error(rc));
|
||||
}
|
||||
|
||||
static void wave_out_tests(void)
|
||||
diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c
|
||||
index 045bf4a..0a259c0 100644
|
||||
index 045bf4ac20..0a259c0f74 100644
|
||||
--- a/dlls/winmm/waveform.c
|
||||
+++ b/dlls/winmm/waveform.c
|
||||
@@ -1088,6 +1088,13 @@ static LRESULT WINMM_OpenDevice(WINMM_Device *device, WINMM_OpenInfo *info,
|
||||
@ -61,5 +64,5 @@ index 045bf4a..0a259c0 100644
|
||||
* WAVEFORMATEX struct, which IAC::IsFormatSupported requires */
|
||||
device->orig_fmt = HeapAlloc(GetProcessHeap(), 0, sizeof(WAVEFORMATEX));
|
||||
--
|
||||
1.9.1
|
||||
2.18.0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user