Commit ef737641 authored by David Reid's avatar David Reid

PulseAudio: Add a null pointer check for safety.

Public issue https://github.com/mackron/miniaudio/issues/527
parent 93e1755e
...@@ -28331,6 +28331,14 @@ static void ma_device_sink_info_callback(ma_pa_context* pPulseContext, const ma_ ...@@ -28331,6 +28331,14 @@ static void ma_device_sink_info_callback(ma_pa_context* pPulseContext, const ma_
return; return;
} }
/*
There has been a report that indicates that pInfo can be null which results
in a null pointer dereference below. We'll check for this for safety.
*/
if (pInfo == NULL) {
return;
}
pInfoOut = (ma_pa_sink_info*)pUserData; pInfoOut = (ma_pa_sink_info*)pUserData;
MA_ASSERT(pInfoOut != NULL); MA_ASSERT(pInfoOut != NULL);
...@@ -28347,6 +28355,14 @@ static void ma_device_source_info_callback(ma_pa_context* pPulseContext, const m ...@@ -28347,6 +28355,14 @@ static void ma_device_source_info_callback(ma_pa_context* pPulseContext, const m
return; return;
} }
/*
There has been a report that indicates that pInfo can be null which results
in a null pointer dereference below. We'll check for this for safety.
*/
if (pInfo == NULL) {
return;
}
pInfoOut = (ma_pa_source_info*)pUserData; pInfoOut = (ma_pa_source_info*)pUserData;
MA_ASSERT(pInfoOut != NULL); MA_ASSERT(pInfoOut != NULL);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment