aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2007-08-28 17:47:39 +0000
committerBill Meier <wmeier@newsguy.com>2007-08-28 17:47:39 +0000
commit66e9ce1c9d4c2d5d1287c8e37193a5227e725e36 (patch)
tree6ebbd1854b4c3f0d11ec5cfd2ff55605d237c8d4 /capture_opts.c
parent41d6f8eca3d7b332e47e3df9a996a1a4a7e41bd5 (diff)
capture_opts_log: use dummy string if iface_desc is NULL;
This fixes dumpcap crash on Windows svn path=/trunk/; revision=22707
Diffstat (limited to 'capture_opts.c')
-rw-r--r--capture_opts.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/capture_opts.c b/capture_opts.c
index df2c8063b5..bb46ac4162 100644
--- a/capture_opts.c
+++ b/capture_opts.c
@@ -134,7 +134,9 @@ capture_opts_log(const char *log_domain, GLogLevelFlags log_level, capture_optio
g_log(log_domain, log_level, "CFile : 0x%p", capture_opts->cf);
g_log(log_domain, log_level, "Filter : %s", capture_opts->cfilter);
g_log(log_domain, log_level, "Interface : %s", capture_opts->iface);
- g_log(log_domain, log_level, "Interface Descr : %s", capture_opts->iface_descr);
+ /* iface_descr may not been filled in and some C Libraries hate a null ptr for %s */
+ g_log(log_domain, log_level, "Interface Descr : %s",
+ capture_opts->iface_descr ? capture_opts->iface_descr : "<null>");
#ifdef _WIN32
g_log(log_domain, log_level, "BufferSize : %u (MB)", capture_opts->buffer_size);
#endif