-- v3: wineoss: Remove superflous check mmdevapi: Add nullcheck for parameter that can be null (Coverity)
From: Fabian Maurer dark.shadow4@web.de
"out" got checked for null earlier, so we should do it here as well
Signed-off-by: Fabian Maurer dark.shadow4@web.de --- dlls/mmdevapi/client.c | 2 +- dlls/mmdevapi/tests/render.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/dlls/mmdevapi/client.c b/dlls/mmdevapi/client.c index 11a0a572d98..743318861c2 100644 --- a/dlls/mmdevapi/client.c +++ b/dlls/mmdevapi/client.c @@ -650,7 +650,7 @@ static HRESULT WINAPI client_IsFormatSupported(IAudioClient3 *iface, AUDCLNT_SHA
WINE_UNIX_CALL(is_format_supported, ¶ms);
- if (params.result == S_FALSE) + if (params.result == S_FALSE && out) *out = ¶ms.fmt_out->Format; else CoTaskMemFree(params.fmt_out); diff --git a/dlls/mmdevapi/tests/render.c b/dlls/mmdevapi/tests/render.c index 8e000f03acb..429ed6524b1 100644 --- a/dlls/mmdevapi/tests/render.c +++ b/dlls/mmdevapi/tests/render.c @@ -139,11 +139,23 @@ static void test_audioclient(void) HRESULT hr; ULONG ref; WAVEFORMATEX *pwfx, *pwfx2; + WAVEFORMATEXTENSIBLE format_float_error; REFERENCE_TIME t1, t2; HANDLE handle; BOOL offload_capable; AudioClientProperties client_props;
+ format_float_error.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE); + format_float_error.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; + format_float_error.Format.nAvgBytesPerSec = 384000; + format_float_error.Format.nBlockAlign = 8; + format_float_error.Format.nChannels = 2; + format_float_error.Format.nSamplesPerSec = 48000; + format_float_error.Format.wBitsPerSample = 32; + format_float_error.Samples.wValidBitsPerSample = 4; + format_float_error.dwChannelMask = 3; + format_float_error.SubFormat = KSDATAFORMAT_SUBTYPE_IEEE_FLOAT; + hr = IMMDevice_Activate(dev, &IID_IAudioClient3, CLSCTX_INPROC_SERVER, NULL, (void**)&ac3); ok(hr == S_OK || @@ -258,6 +270,11 @@ static void test_audioclient(void) "IsFormatSupported(Exclusive) call returns %08lx\n", hr); hexcl = hr;
+ hr = IAudioClient_IsFormatSupported(ac, AUDCLNT_SHAREMODE_EXCLUSIVE, &format_float_error.Format, NULL); + todo_wine + ok(hr == S_OK || hr == AUDCLNT_E_UNSUPPORTED_FORMAT || hr == AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED, + "IsFormatSupported(Exclusive) call returns %08lx\n", hr); + pwfx2 = (WAVEFORMATEX*)0xDEADF00D; hr = IAudioClient_IsFormatSupported(ac, AUDCLNT_SHAREMODE_EXCLUSIVE, pwfx, &pwfx2); ok(hr == hexcl, "IsFormatSupported(Exclusive) call returns %08lx\n", hr);
From: Fabian Maurer dark.shadow4@web.de
--- dlls/wineoss.drv/oss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/wineoss.drv/oss.c b/dlls/wineoss.drv/oss.c index 097e048d03b..c7e79e13b22 100644 --- a/dlls/wineoss.drv/oss.c +++ b/dlls/wineoss.drv/oss.c @@ -551,7 +551,7 @@ static HRESULT setup_oss_device(AUDCLNT_SHAREMODE share, int fd, if(ret == S_FALSE && !out) ret = AUDCLNT_E_UNSUPPORTED_FORMAT;
- if(ret == S_FALSE && out){ + if(ret == S_FALSE){ closest->Format.nBlockAlign = closest->Format.nChannels * closest->Format.wBitsPerSample / 8; closest->Format.nAvgBytesPerSec =
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=135244
Your paranoid android.
=== w1064v1507 (32 bit report) ===
mmdevapi: render.c:1359: Test failed: GetBuffer large (20671) at iteration 6 render.c:1359: Test failed: GetBuffer large (20671) at iteration 2 render.c:1359: Test failed: GetBuffer large (20671) at iteration 3 render.c:1359: Test failed: GetBuffer large (20671) at iteration 4
=== w1064v1809 (32 bit report) ===
mmdevapi: render.c:1359: Test failed: GetBuffer large (20671) at iteration 4
=== w10pro64 (32 bit report) ===
mmdevapi: render.c:1359: Test failed: GetBuffer large (22500) at iteration 6
=== w1064_tsign (64 bit report) ===
mmdevapi: render.c:1359: Test failed: GetBuffer large (22500) at iteration 3 render.c:1359: Test failed: GetBuffer large (22500) at iteration 4
=== w10pro64 (64 bit report) ===
mmdevapi: render.c:1359: Test failed: GetBuffer large (22500) at iteration 6
=== debian11 (32 bit report) ===
mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008
=== debian11 (32 bit ar:MA report) ===
mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008
=== debian11 (32 bit de report) ===
mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008
=== debian11 (32 bit fr report) ===
mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008
=== debian11 (32 bit he:IL report) ===
mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008
=== debian11 (32 bit hi:IN report) ===
mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008
=== debian11 (32 bit ja:JP report) ===
mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008
=== debian11 (32 bit zh:CN report) ===
mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008
=== debian11b (32 bit WoW report) ===
mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008
=== debian11b (64 bit WoW report) ===
mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008
On Tue Jul 25 18:42:56 2023 +0000, Huw Davies wrote:
Could you split this so that the advpack commit is in a different MR?
Sure, done. Should I change the check to return a different error code?
On Tue Jul 25 20:31:16 2023 +0000, **** wrote:
Marvin replied on the mailing list:
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details: The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=135244 Your paranoid android. === w1064v1507 (32 bit report) === mmdevapi: render.c:1359: Test failed: GetBuffer large (20671) at iteration 6 render.c:1359: Test failed: GetBuffer large (20671) at iteration 2 render.c:1359: Test failed: GetBuffer large (20671) at iteration 3 render.c:1359: Test failed: GetBuffer large (20671) at iteration 4 === w1064v1809 (32 bit report) === mmdevapi: render.c:1359: Test failed: GetBuffer large (20671) at iteration 4 === w10pro64 (32 bit report) === mmdevapi: render.c:1359: Test failed: GetBuffer large (22500) at iteration 6 === w1064_tsign (64 bit report) === mmdevapi: render.c:1359: Test failed: GetBuffer large (22500) at iteration 3 render.c:1359: Test failed: GetBuffer large (22500) at iteration 4 === w10pro64 (64 bit report) === mmdevapi: render.c:1359: Test failed: GetBuffer large (22500) at iteration 6 === debian11 (32 bit report) === mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008 === debian11 (32 bit ar:MA report) === mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008 === debian11 (32 bit de report) === mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008 === debian11 (32 bit fr report) === mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008 === debian11 (32 bit he:IL report) === mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008 === debian11 (32 bit hi:IN report) === mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008 === debian11 (32 bit ja:JP report) === mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008 === debian11 (32 bit zh:CN report) === mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008 === debian11b (32 bit WoW report) === mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008 === debian11b (64 bit WoW report) === mmdevapi: render.c:275: Test succeeded inside todo block: IsFormatSupported(Exclusive) call returns 88890008
These failures look new.