diff options
author | Harald Welte <laforge@gnumonks.org> | 2013-03-19 10:37:39 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2013-03-19 10:37:39 +0100 |
commit | 1a02cfc24d2c812ba13e5aa936588be447bb24af (patch) | |
tree | 3b429e7b25723c9f3db4a56ce555afc34ec87f8d /src | |
parent | 54c5ed1518b5856e282fd3f7bba02c27ea9d879d (diff) |
logging_vty: Fix segfault un unused entries in log_info_cat array of app
Diffstat (limited to 'src')
-rw-r--r-- | src/vty/logging_vty.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vty/logging_vty.c b/src/vty/logging_vty.c index fc1ca430..a6d2f522 100644 --- a/src/vty/logging_vty.c +++ b/src/vty/logging_vty.c @@ -632,6 +632,10 @@ static int config_write_log_single(struct vty *vty, struct log_target *tgt) const struct log_category *cat = &tgt->categories[i]; char cat_lower[32]; + /* skip empty entries in the array */ + if (!osmo_log_info->cat[i].name) + continue; + /* stupid old osmo logging API uses uppercase strings... */ osmo_str2lower(cat_lower, osmo_log_info->cat[i].name+1); osmo_str2lower(level_lower, log_level_str(cat->loglevel)); |