diff --git a/storagehandler.cpp b/storagehandler.cpp
index fa630e3..b222fa7 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -640,32 +640,31 @@
 {
     ipmi_ret_t rc = IPMI_CC_OK;
     const ReadFruDataRequest* reqptr =
-         reinterpret_cast<const ReadFruDataRequest*>(request);
+        reinterpret_cast<const ReadFruDataRequest*>(request);
+    auto resptr =
+        reinterpret_cast<ReadFruDataResponse*>(response);
     auto offset =
         static_cast<uint16_t>(reqptr->offsetMS << 8 | reqptr->offsetLS);
     try
     {
         const auto& fruArea = getFruAreaData(reqptr->fruID);
         auto size = fruArea.size();
-        if ((offset + reqptr->count) > size)
+
+        // Write the count of response data.
+        if ((offset + reqptr->count) <= size)
         {
-            log<level::ERR>("Invalid offset and count",
-                            entry("OFFSET=%s", offset),
-                            entry("COUNT=%s", reqptr->count),
-                            entry("SIZE_OF_FRU_AREA=%s", size));
-            return IPMI_CC_INVALID;
+            resptr->count = reqptr->count;
+        }
+        else
+        {
+            resptr->count = size - offset;
         }
 
-        // Write the count of requested data.
-        auto buff = static_cast<uint8_t *>(response);
-        *buff = reqptr->count;
-        buff++;
-
         std::copy((fruArea.begin() + offset),
-                  (fruArea.begin() + offset + reqptr->count),
-                  buff);
+                  (fruArea.begin() + offset + resptr->count),
+                  resptr->data);
 
-        *data_len = reqptr->count + 1; // additional one byte for count
+        *data_len = resptr->count + 1; // additional one byte for count
     }
     catch (const InternalFailure& e)
     {
diff --git a/storagehandler.h b/storagehandler.h
index 1849fc7..009b281 100644
--- a/storagehandler.h
+++ b/storagehandler.h
@@ -46,6 +46,15 @@
 }__attribute__ ((packed));
 
 /**
+ * @struct Read FRU Data command response data
+ */
+struct ReadFruDataResponse
+{
+    uint8_t count; ///< Response data Count.
+    uint8_t data[]; ///< Response data.
+}__attribute__ ((packed));
+
+/**
  * @struct Get FRU inventory area info command request data
  */
 struct FruInvenAreaInfoRequest
