Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Zero all the things!

  • Loading branch information...
commit 65dc75a530072f9919448c9ad9d51453c251f84a 1 parent 1b5f094
@msantos authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 c_src/ewpcap.c
View
4 c_src/ewpcap.c
@@ -312,7 +312,7 @@ nif_pcap_close(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[])
nif_pcap_lookupdev(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[])
{
char *dev = NULL;
- char errbuf[PCAP_ERRBUF_SIZE];
+ char errbuf[PCAP_ERRBUF_SIZE] = {0};
dev = pcap_lookupdev(errbuf);
@@ -367,7 +367,7 @@ nif_pcap_lookupdev(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[])
nif_pcap_findalldevs(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[])
{
pcap_if_t *alldevsp = NULL;
- char errbuf[PCAP_ERRBUF_SIZE];
+ char errbuf[PCAP_ERRBUF_SIZE] = {0};
ERL_NIF_TERM dev = {0};
Please sign in to comment.
Something went wrong with that request. Please try again.