summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--storagehandler.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/storagehandler.cpp b/storagehandler.cpp
index 6f97bef..3f1ebe2 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -652,6 +652,11 @@ ipmi_ret_t ipmi_storage_read_fru_data(
const auto& fruArea = getFruAreaData(reqptr->fruID);
auto size = fruArea.size();
+ if (offset >= size)
+ {
+ return IPMI_CC_PARM_OUT_OF_RANGE;
+ }
+
// Write the count of response data.
if ((offset + reqptr->count) <= size)
{
OpenPOWER on IntegriCloud