diff options
author | Jayanth Othayoth <ojayanth@in.ibm.com> | 2017-10-27 00:45:53 -0500 |
---|---|---|
committer | Jayanth Othayoth <ojayanth@in.ibm.com> | 2017-10-31 01:31:03 -0500 |
commit | 59ce099b7b59e86f2cc8ffedd3c97143dfccd33c (patch) | |
tree | 645f092327fbcf656573bf31de8ff53701be80dc /pnor_partition_table.hpp | |
parent | 8493c33b1adbaf0adaa6bf2b7c1696e86a89ab1b (diff) | |
download | phosphor-mboxd-59ce099b7b59e86f2cc8ffedd3c97143dfccd33c.tar.gz phosphor-mboxd-59ce099b7b59e86f2cc8ffedd3c97143dfccd33c.zip |
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>
Diffstat (limited to 'pnor_partition_table.hpp')
-rw-r--r-- | pnor_partition_table.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pnor_partition_table.hpp b/pnor_partition_table.hpp index 662fb76..1cabe23 100644 --- a/pnor_partition_table.hpp +++ b/pnor_partition_table.hpp @@ -134,8 +134,8 @@ class Table * * @param[in] offset - PNOR offset in bytes * - * @returns const reference to pnor_partition, if found, else a - * reference to a zeroed out pnor_partition structure. + * @returns const reference to pnor_partition, if found, else an + * exception will be thrown. */ const pnor_partition& partition(size_t offset) const; |