xpcap icon indicating copy to clipboard operation
xpcap copied to clipboard

Cross-platform Packet Capture which supports Linux and macOS(BSD) in 1000 LOC without depending on libpcap.

Results 4 xpcap issues
Sort by recently updated
recently updated
newest added

Raw socket buffer allocation is done based on sniffer->buf_len, which is not initialized: Line 143 in sniffer.c: ` sniffer->buffer = malloc(sizeof(char) * sniffer->buf_len);`

Line 57 in sniffer.c: `if (sniffer->fd != -1)` Should be: `if (sniffer->fd == -1)`

Sniffer params structure is not fully initialized in main.c. Specifically, params.device is uninitialized and used in sniffer.c.

refs * https://gist.github.com/pklaus/289646 * https://gist.github.com/OrangeTide/909204 * https://stackoverflow.com/questions/19227781/linux-getting-all-network-interface-names * https://github.com/al45tair/netifaces/blob/master/netifaces.c * https://books.google.co.jp/books?id=TJZGDwAAQBAJ&pg=PA81&lpg=PA81&dq=iL+SIOCGIFCONF&source=bl&ots=1CGTn4b2V4&sig=ACfU3U050GTPXLssBawtJUpjb5K0yUQIfA&hl=en&sa=X&ved=2ahUKEwj8v5yX7PrgAhV1yosBHZiWCo0Q6AEwCHoECAIQAQ#v=onepage&q=iL%20SIOCGIFCONF&f=false