Fix for mboxd segfault during flash read

mboxd segfaults during flash read when there is
no partition associated to the given offset within the
flash size.

Proposed fix is to generate elog instead of returning
reference to zeroed out pnor_partition structure.

Resolves openbmc/openbmc#2365

Change-Id: I98bed1c09588c386d9ea2510618bb27eaa6dfbe0
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
diff --git a/pnor_partition_table.cpp b/pnor_partition_table.cpp
index 71510a2..aa68750 100644
--- a/pnor_partition_table.cpp
+++ b/pnor_partition_table.cpp
@@ -218,6 +218,9 @@
         }
     }
 
+    MSG_ERR("Partition corresponding to offset %x not found", offset);
+    elog<InternalFailure>();
+
     static pnor_partition p{};
     return p;
 }