[Skiboot] [PATCH 2/3] [NVRAM] Fix potential NULL pointer dereference
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Thu Jun 18 15:36:01 AEST 2015
On 06/17/2015 01:53 PM, Ananth N Mavinakayanahalli wrote:
> Safety check...
>
> Signed-off-by: Ananth N Mavinakayanahalli <ananth at in.ibm.com>
Patch looks good.. But I see few other instances in the same file where we don't
check fsp_mkmsg() return value.. which is probably ok as fsp_queue_msg validates
msg before using..
Reviewed-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
-Vasant
> ---
> 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);
>
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot
>
More information about the Skiboot
mailing list