On Mon, Jan 11, 2016 at 07:32:31AM -0600, [email protected] wrote:
> From: Corey Minyard <[email protected]>
> 
> Found by Paolo.
> 
> Cc: Paolo Bonzini <[email protected]>
> Cc: Michael S. Tsirkin <[email protected]>
> Cc: Peter Maydell <[email protected]>
> Cc: Shannon Zhao <[email protected]>
> Cc: Xiao Guangrong <[email protected]>
> Cc: Stefan Hajnoczi <[email protected]>
> Signed-off-by: Corey Minyard <[email protected]>

Reviewed-by: Michael S. Tsirkin <[email protected]>

> ---
>  hw/ipmi/ipmi_bmc_sim.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c
> index 0a59e53..3ecf02e 100644
> --- a/hw/ipmi/ipmi_bmc_sim.c
> +++ b/hw/ipmi/ipmi_bmc_sim.c
> @@ -546,7 +546,7 @@ static void ipmi_init_sensors_from_sdrs(IPMIBmcSim *s)
>  static int ipmi_register_netfn(IPMIBmcSim *s, unsigned int netfn,
>                                 const IPMINetfn *netfnd)
>  {
> -    if ((netfn & 1) || (netfn > MAX_NETFNS) || (s->netfns[netfn / 2])) {
> +    if ((netfn & 1) || (netfn >= MAX_NETFNS) || (s->netfns[netfn / 2])) {
>          return -1;
>      }
>      s->netfns[netfn / 2] = netfnd;
> -- 
> 2.5.0

Reply via email to