From 863553891b296c5574d6b0893ad21fe16b97a6ea Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Mon, 18 Dec 2023 13:22:37 +0100 Subject: irmd: Fix passing symmetric key on allocation The check if the flow requires a key in irmd flow_alloc was missing when setting the pointers for the piggyback data, so non-encrypted flow allocations failed on irm_msg__pack(). Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/dev.c b/src/lib/dev.c index acf18da2..74a8c62d 100644 --- a/src/lib/dev.c +++ b/src/lib/dev.c @@ -475,7 +475,7 @@ static int flow_init(int flow_id, flow->crypt.flags = qs.cypher_s; /* TODO: remove cypher_s from qos */ - if (flow->crypt.flags > 0) + if (flow->crypt.flags > 0 && s != NULL) /* static analyzer s != NULL */ memcpy(flow->crypt.key, s ,SYMMKEYSZ); else memset(flow->crypt.key, 0, SYMMKEYSZ); -- cgit v1.2.3