qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 13/16] ahci: add get_cmd_header helper


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 13/16] ahci: add get_cmd_header helper
Date: Fri, 26 Jun 2015 16:51:43 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, Jun 22, 2015 at 08:21:12PM -0400, John Snow wrote:
> +static AHCICmdHdr *get_cmd_header(AHCIState *s, uint8_t port, uint8_t slot)
> +{
> +    if (port > s->ports || slot > AHCI_MAX_CMDS) {

Should these be >= instead of >?  Otherwise 1 element beyond the end of
the array can be accessed.

Attachment: pgp94kHKobvkd.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]