aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--components/messaging/ffa/libsp/sp_discovery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/messaging/ffa/libsp/sp_discovery.c b/components/messaging/ffa/libsp/sp_discovery.c
index a80116779..1f512a7b9 100644
--- a/components/messaging/ffa/libsp/sp_discovery.c
+++ b/components/messaging/ffa/libsp/sp_discovery.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: BSD-3-Clause
/*
- * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
*/
#include "sp_discovery.h"
@@ -64,7 +64,7 @@ partition_info_get(const struct sp_uuid *uuid,
return SP_RESULT_FFA(ffa_res);
}
- if (*count * sizeof(struct ffa_partition_information) < buffer_size) {
+ if ((*count * sizeof(struct ffa_partition_information)) > buffer_size) {
/*
* The indicated amount of info structures doesn't fit into the
* RX buffer.