Skip to content
Commit e8ad2326 authored by Yong Bakos's avatar Yong Bakos Committed by Pekka Paalanen
Browse files

wl_array: Set data to invalid address after free

Explicitly set the data member to an invalid memory address during
wl_array_release, such that re-using a freed wl_array without re-initializing
causes a crash. In addition, this pointer assignment makes wl_array_release
testable.

Define a constant for the invalid memory address, and add documentation about
this behavior, starting at libwayland version 1.13.

See https://lists.freedesktop.org/archives/wayland-devel/2016-September/031116.html



Signed-off-by: default avatarYong Bakos <ybakos@humanoriented.com>
Reviewed-by: default avatarEric Engestrom <eric.engestrom@imgtec.com>
[Pekka: remove the doc about crashing]
Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
parent db617960
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment