mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
PulseAudio: Add a null pointer check for safety.
Public issue https://github.com/mackron/miniaudio/issues/527
This commit is contained in:
+16
@@ -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
|
|||||||
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);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user