Skip to content
Commit 7fdf9210 authored by Jasper St. Pierre's avatar Jasper St. Pierre
Browse files

gnome-rr-config: Make sure to copy over vendor/product/serial

When GnomeRROutputInfo is normally created, we strdup the
vendor/product/serial strings that we read from EDID. When it's
finalized, we free them as well.

When we copy the output info, we actually copy the raw struct, and then
selectively strdup members that we care about. When the copy is freed,
we then free the pointer that we dup'd from. When the original output
info is freed, this leads to a double-free. Due to coincidences, on x86,
this doesn't lead to a crash, but on ARM, the heap is completely
corrupted.

To prevent this, when we copy the output infos, strdup them from the
original output as well. We really should clean this API up so that it's
not so awfully RandR-y in style, since it's obvious that the APIs we
have aren't great and really aren't what we need.

https://bugzilla.gnome.org/show_bug.cgi?id=742569
parent d5294305
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment