forked from wine-mirror/wine
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
In function pcap_lookupdev, the return condition is incorrect and can lead to a NULL pointer dereference.
Specifically, the code snippet is:
Line 476 in 9fa3f75
| if (pcap_findalldevs( &devs, errbuf ) == -1 || devs) return NULL; |
With the current logic, the function proceeds only when pcap_findalldevs returns success and devs == NULL, and then unconditionally dereferences devs.
Since function pcap_lookupdev is exported (as shownwpcap.spec) and externally callable,
Line 47 in 9fa3f75
| @ cdecl pcap_lookupdev(ptr) |
this results in a reachable crash if pcap_findalldevs returns 0 while leaving devs unset.
The condition likely should be || !devs instead of || devs.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels