Permalink
Browse files

Zero all the things!

  • Loading branch information...
1 parent 1b5f094 commit 65dc75a530072f9919448c9ad9d51453c251f84a @msantos committed Oct 9, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 c_src/ewpcap.c
View
@@ -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};

0 comments on commit 65dc75a

Please sign in to comment.