aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-04-27 13:47:01 +0200
committerThomas White <taw@physics.org>2018-04-27 13:47:01 +0200
commit441065f6d22f171c9c7482f7e6fd0a707957eac3 (patch)
tree8c050d956532bf94cc6346fcc6769ce99978f9c9
parent9d5f4228cb7f38293e6997c884317fb924404440 (diff)
get_pattern(): Check event ID could be parsed correctly
-rw-r--r--src/im-sandbox.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/im-sandbox.c b/src/im-sandbox.c
index 24fc767c..74467529 100644
--- a/src/im-sandbox.c
+++ b/src/im-sandbox.c
@@ -261,9 +261,15 @@ static struct filename_plus_event *get_pattern(FILE *fh, int config_basename,
struct event *ev_to_add;
ev_to_add = get_event_from_event_string(event_buf);
- append_event_to_event_list(ev_list, ev_to_add);
- free_event(ev_to_add);
- event_index = 0;
+ if ( ev_to_add == NULL ) {
+ ERROR("Bad event descriptor: '%s'\n",
+ event_buf);
+ } else {
+ append_event_to_event_list(ev_list,
+ ev_to_add);
+ free_event(ev_to_add);
+ event_index = 0;
+ }
}