diff options
author | Dimitri Staessens <[email protected]> | 2023-12-18 13:22:37 +0100 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2023-12-31 16:47:55 +0100 |
commit | 863553891b296c5574d6b0893ad21fe16b97a6ea (patch) | |
tree | 4b71169f7aea62a0c043ff85d9597b9e395b26bd /src/lib | |
parent | 9ecb29b3691df17c0beec56ddf4f27160bb3ef58 (diff) | |
download | ouroboros-863553891b296c5574d6b0893ad21fe16b97a6ea.tar.gz ouroboros-863553891b296c5574d6b0893ad21fe16b97a6ea.zip |
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 <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |