From f7c26230eb5ed3e3fc8517f069b1ef863aef8260 Mon Sep 17 00:00:00 2001 From: Kevin Mitchell Date: Mon, 17 Nov 2014 03:28:41 -0800 Subject: ao/wasapi: fix possible null dereference of pDevice IMMDeviceEnumerator::GetDefaultAudioEndpoint may set pDevice to null on failure. http://msdn.microsoft.com/en-us/library/windows/desktop/dd371401%28v=vs.85%29.aspx --- audio/out/ao_wasapi_utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/audio/out/ao_wasapi_utils.c b/audio/out/ao_wasapi_utils.c index 69bbefe5ef..cf94220c4e 100755 --- a/audio/out/ao_wasapi_utils.c +++ b/audio/out/ao_wasapi_utils.c @@ -950,6 +950,7 @@ HRESULT wasapi_thread_init(struct ao *ao) eRender, eConsole, &state->pDevice); SAFE_RELEASE(pEnumerator, IMMDeviceEnumerator_Release(pEnumerator)); + EXIT_ON_ERROR(hr); char *id = get_device_id(state->pDevice); MP_VERBOSE(ao, "Default device ID: %s\n", id); -- cgit v1.2.3