mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
fix bad memory access if a non-existing entry shall be removed from a pa_idxset by index
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1173 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
d7ee1bcf75
commit
e2e94ca47c
1 changed files with 3 additions and 0 deletions
|
|
@ -286,6 +286,9 @@ void* pa_idxset_remove_by_index(pa_idxset*s, uint32_t idx) {
|
|||
if (!(a = array_index(s, idx)))
|
||||
return NULL;
|
||||
|
||||
if (!*a)
|
||||
return NULL;
|
||||
|
||||
data = (*a)->data;
|
||||
remove_entry(s, *a);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue