FILE* file = fopen(some file)
pcap_t* pd = pcap_fopen_offline(file)
pcap_close(pd)
fclose(file)
This code occurs double free error.
Could you explain about this happening?
My Guess is that pd and file pointers are sharing some datas.
FILE* file = fopen(some file)
pcap_t* pd = pcap_fopen_offline(file)
pcap_close(pd)
fclose(file)
This code occurs double free error.
Could you explain about this happening?
My Guess is that pd and file pointers are sharing some datas.
Copyright © 2021 Jogjafile Inc.
As the documentation says, the
pcap_closefunction closes the files associated with thepcap_tstructure passed to it. Closing the file again withfcloseis an error.