Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2:Ports
arp-scan
arp-scan-avoid-crash.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File arp-scan-avoid-crash.patch of Package arp-scan
commit 195ff60b98696e822c4a877523b2097d40386cc1 Author: Roy Hills <royhills@hotmail.com> Date: Wed Dec 4 18:30:14 2013 +0000 Die with an error if we can't open a raw packet socket. diff --git a/link-packet-socket.c b/link-packet-socket.c index d25463b..de1eefc 100644 --- a/link-packet-socket.c +++ b/link-packet-socket.c @@ -68,8 +68,8 @@ link_open(const char *device) { handle = Malloc(sizeof(*handle)); memset(handle, '\0', sizeof(*handle)); if ((handle->fd = socket(PF_PACKET, SOCK_RAW, 0)) < 0) { - free(handle); - return NULL; + warn_msg("ERROR: Cannot open raw packet socket"); + err_sys("socket"); } strlcpy(handle->ifr.ifr_name, device, sizeof(handle->ifr.ifr_name)); if ((ioctl(handle->fd, SIOCGIFINDEX, &(handle->ifr))) != 0)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor