From 52894180cf9d44e1f13f467abafc1fd64ffb8c9e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 26 Mar 2021 18:39:30 -0400 Subject: [PATCH] Fix: on-event condition: don't abort() on invalid event expression type MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Protocol errors should not result in crashes. Simply report the failure to deserialize the event expression. Signed-off-by: Jérémie Galarneau Change-Id: Ic5a0be6b248c430fcf1fe487cd734d9bdf5dd36a --- src/common/conditions/on-event.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/conditions/on-event.c b/src/common/conditions/on-event.c index 31d6d756b..fa37a3540 100644 --- a/src/common/conditions/on-event.c +++ b/src/common/conditions/on-event.c @@ -743,7 +743,9 @@ struct lttng_event_expr *event_expr_from_payload( break; } default: - abort(); + ERR("Invalid event expression type encoutered while deserializing event expression: type = %" PRIu64, + type); + goto error; } goto end; -- 2.34.1