add size checking for input payload data

verify input data size before accessing to prevent out of bound access.

Tested:
ipmitool with lanplus works same as without the change.
ipmitool  -I lanplus -U xx -P xx -H ip -C 17 sol info
ipmitool  -I lanplus -U xx -P xx -H ip -C 17 sensor list
ipmitool  -I lanplus -U xx -P xx -H ip -C 17 sdr list
ipmitool  -I lanplus -U xx -P xx -H ip -C 17 user list 1

Signed-off-by: Zhikui Ren <zhikui.ren@intel.com>
Change-Id: I5025aa2666c8873b7c63f8323a932c0480b59304
diff --git a/command/sol_cmds.cpp b/command/sol_cmds.cpp
index a8fa410..fda3e91 100644
--- a/command/sol_cmds.cpp
+++ b/command/sol_cmds.cpp
@@ -17,6 +17,12 @@
 std::vector<uint8_t> payloadHandler(const std::vector<uint8_t>& inPayload,
                                     const message::Handler& handler)
 {
+    // Check inPayload size is at least Payload
+    if (inPayload.size() < sizeof(Payload))
+    {
+        return std::vector<uint8_t>();
+    }
+
     auto request = reinterpret_cast<const Payload*>(inPayload.data());
     auto solDataSize = inPayload.size() - sizeof(Payload);