mirror of
https://gitlab.freedesktop.org/pipewire/pipewire
synced 2024-07-21 02:05:38 +00:00
![]() Re-using an id after removing it is a bug in the caller but there are two cases where we corrupt the free list without warning: Removing an object twice: id = pw_map_insert_new(object); pw_map_remove(map, id); pw_map_remove(map, id); And inserting an element at an index previously removed: id = pw_map_insert_new(object); pw_map_remove(map, id); pw_map_insert_at(map, id, new_object); The latter is arguably valid code, or at least it'll look like it's valid code. For both cases, check if the id to remove/insert at is a free item and handle that accordingly. |
||
---|---|---|
.. | ||
meson.build | ||
pwtest-compat.c | ||
pwtest-implementation.h | ||
pwtest.c | ||
pwtest.h | ||
test-array.c | ||
test-client.c | ||
test-config.c | ||
test-context.c | ||
test-example.c | ||
test-lib.c | ||
test-logger.c | ||
test-map.c | ||
test-properties.c | ||
test-pwtest.c | ||
test-spa-buffer.c | ||
test-spa-json.c | ||
test-spa-log.c | ||
test-spa-node.c | ||
test-spa-pod.c | ||
test-spa-utils.c | ||
test-support.c | ||
test-utils.c |