[Skiboot] [PATCH 2/3] [NVRAM] Fix potential NULL pointer dereference
Ananth N Mavinakayanahalli
ananth at in.ibm.com
Wed Jun 17 18:23:47 AEST 2015
Safety check...
Signed-off-by: Ananth N Mavinakayanahalli <ananth at in.ibm.com>
---
hw/fsp/fsp-nvram.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/fsp/fsp-nvram.c b/hw/fsp/fsp-nvram.c
index 257cdd6..2d518f3 100644
--- a/hw/fsp/fsp-nvram.c
+++ b/hw/fsp/fsp-nvram.c
@@ -271,6 +271,8 @@ static bool fsp_nvram_get_size(uint32_t *out_size)
int rc, size;
msg = fsp_mkmsg(FSP_CMD_GET_VNVRAM_SIZE, 0);
+ assert(msg);
+
rc = fsp_sync_msg(msg, false);
size = msg->resp ? msg->resp->data.words[0] : 0;
fsp_freemsg(msg);
More information about the Skiboot
mailing list