summaryrefslogtreecommitdiff
path: root/lib/ipmi_channel.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2022-09-10 15:44:31 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2022-09-10 15:44:31 +0200
commit36a24e9032591da8cc7688f69e7e9f5f41ffe4ab (patch)
treeeec9b06cd7f4498ef4db3e2f7973e08904981c48 /lib/ipmi_channel.c
parentdce3efdab4ea7314a3e1db3af2cb0aac3f48dcef (diff)
New upstream release
Diffstat (limited to 'lib/ipmi_channel.c')
-rw-r--r--lib/ipmi_channel.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ipmi_channel.c b/lib/ipmi_channel.c
index fab2e54..a744920 100644
--- a/lib/ipmi_channel.c
+++ b/lib/ipmi_channel.c
@@ -413,7 +413,10 @@ ipmi_get_channel_cipher_suites(struct ipmi_intf *intf, const char *payload_type,
lprintf(LOG_ERR, "Unable to Get Channel Cipher Suites");
return -1;
}
- if (rsp->ccode > 0) {
+ if (rsp->ccode
+ || rsp->data_len < 1
+ || rsp->data_len > sizeof(uint8_t) + MAX_CIPHER_SUITE_DATA_LEN)
+ {
lprintf(LOG_ERR, "Get Channel Cipher Suites failed: %s",
val2str(rsp->ccode, completion_code_vals));
return -1;