зеркало из https://github.com/mozilla/cubeb.git
Null check input and output stream param before dereferencing
This commit is contained in:
Родитель
48e349ef99
Коммит
4e851e9960
|
@ -996,8 +996,8 @@ aaudio_stream_init(cubeb * ctx, cubeb_stream ** stream,
|
|||
stm->user_ptr = user_ptr;
|
||||
stm->data_callback = data_callback;
|
||||
stm->state_callback = state_callback;
|
||||
stm->voice_input = !!(input_stream_params->prefs & CUBEB_STREAM_PREF_VOICE);
|
||||
stm->voice_output = !!(output_stream_params->prefs & CUBEB_STREAM_PREF_VOICE);
|
||||
stm->voice_input = input_stream_params && !!(input_stream_params->prefs & CUBEB_STREAM_PREF_VOICE);
|
||||
stm->voice_output = output_stream_params && !!(output_stream_params->prefs & CUBEB_STREAM_PREF_VOICE);
|
||||
|
||||
LOG("cubeb stream prefs: voice_input: %s voice_output: %s",
|
||||
stm->voice_input ? "true" : "false",
|
||||
|
|
Загрузка…
Ссылка в новой задаче