PLDM BIOS attr enum return error if byte value is 2

Signed-off-by: Varsha Kaverappa <vkaverap@in.ibm.com>
Change-Id: I67da5157da04649474ff4fa770f7d2652a09e607
diff --git a/libpldmresponder/bios_config.cpp b/libpldmresponder/bios_config.cpp
index e955f26..c808002 100644
--- a/libpldmresponder/bios_config.cpp
+++ b/libpldmresponder/bios_config.cpp
@@ -642,7 +642,10 @@
                 table::attribute_value::decodeEnumEntry(attrValueEntry);
             auto [pvHdls, defIndex] =
                 table::attribute::decodeEnumEntry(attrEntry);
-            assert(value.size() == 1);
+            if (!(value.size() == 1))
+            {
+                return PLDM_ERROR_INVALID_LENGTH;
+            }
             if (value[0] >= pvHdls.size())
             {
                 std::cerr << "Enum: Illgeal index, Index = " << (int)value[0]