mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-24 23:36:04 +00:00
* fix(desktop): links read into a buffer sized from lstat show their guest target
lstat reports the guest length of a link stored with a rootfs target, and dpkg's
update-alternatives then reads it with exactly that many bytes. readlink filled the
buffer with the start of the host path, which could no longer be mapped back, so
every alternative looked dangling ("current alternative /data/dat is unknown").
The whole target is read first, mapped, then copied into the caller's buffer.
* fix(desktop): a zero-sized readlink buffer still fails with EINVAL
* test(desktop): read errno before printing the zero-size readlink result