Repository navigation
Commit 20acc2c
Guard evdi_open_attached_to() against a NULL parent device
evdi_open_attached_to_fixed() documents NULL as a valid argument meaning
"open a generic device", and handles it:
if (sysfs_parent_device == NULL)
device_index = get_generic_device();
but the deprecated evdi_open_attached_to() wrapper calls strlen() on the
pointer unconditionally, so passing NULL faults before that check can
ever run:
SIGSEGV si_code=SEGV_MAPERR si_addr=NULL
#1 evdi_open_attached_to (libevdi.so.1 + 0x4523)
Pass a length of 0 when the pointer is NULL, so the documented behaviour
is reachable through the old entry point as well as the new one.
This was reported in #582 and closed without the wrapper being changed,
so the fault is still present.
Co-Authored-By: Claude Opus 5 <[email protected]>1 parent 3609bef commit 20acc2c
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
643 | 645 | | |
644 | 646 | | |
645 | 647 | | |
| |||
0 commit comments