From e9f9bcc7480dfd237b3be85d56df5334a7666a2c Mon Sep 17 00:00:00 2001 From: Gang Zhuo Date: Fri, 10 Mar 2023 14:00:54 +0800 Subject: [PATCH] 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. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 4c4f5d5..f4a2b6f 100644 --- a/src/main.c +++ b/src/main.c @@ -130,7 +130,7 @@ int main(int argc, char* argv[]) { 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]; #if defined(WITH_GNUTLS) || defined(WITH_OPENSSL) const char *keyfile;