Initialize text_outfile to NULL.

'device' and 'outfile' are initialized from 'settings' in the later code,
but 'text_outfile' is not initialized, which may lead to writing to an unknown file.
This commit is contained in:
Gang Zhuo 2023-03-10 14:00:54 +08:00 committed by Kaian
parent f39fa0b59b
commit e9f9bcc748
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@ int
main(int argc, char* argv[]) main(int argc, char* argv[])
{ {
int opt, idx, limit, only_calls, no_incomplete, pcap_buffer_size, i; int opt, idx, limit, only_calls, no_incomplete, pcap_buffer_size, i;
const char *device, *outfile, *text_outfile; const char *device, *outfile, *text_outfile = NULL;
char bpf[512]; char bpf[512];
#if defined(WITH_GNUTLS) || defined(WITH_OPENSSL) #if defined(WITH_GNUTLS) || defined(WITH_OPENSSL)
const char *keyfile; const char *keyfile;