[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: |
John Snow |
Subject: |
Re: [Qemu-devel] [PATCH 13/16] ahci: add get_cmd_header helper |
Date: |
Fri, 26 Jun 2015 14:32:49 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 06/26/2015 11:51 AM, Stefan Hajnoczi wrote:
> 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.
>
Sigh.
Yes, yes it should. Thank you for saving me from myself.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJVjZrRAAoJEH3vgQaq/DkOjcMP/0CqxJAWcgsnFH5Opwz7iNbm
OyvLakvzUmU958qN3nzG2vMME3WwyVF3bxVJkoT3v1Pc6Tm9e+hq+R1oDzD0TD6X
tfjQTc5JZcViKSD74Huo85gKoVp3Tp4idOaaVFn36TmP9gk5i6g/C0Nf7EzY12Er
4op6mLvBhiU6NH72UwP4HHij0KZCMCVYYH4qhAWsil/QIugAgELlM9TFkVI49lHs
WN3IE+5gQijd99Z5VJaC9wrmtOdZWHblfTeWMvVQfMfbg5dJ2Aiya1tHlw6QrPzb
7nGPHTwyGLmNsvUsNqMHrWGaL9e4iEwXGYNRnIT16L8QPzGqg7v4D3lvJcGv5LrM
OFPje2Fk9w8OGdgRjrQhQcJXfU+IPkvlwnW7G3NO2Ts0GK5cHClRafZVjvAhMuXs
5M89BTdi7LBGJ7EWq8ByP5mxPj+hiR3hsSG41OPFg3e0VpwtgFJ6umaZde1tMrHp
IwnOZcvXUoTOAna3Y4E/fSwK1jKczTXIvkl4+HnJB40ekyoSkyl6qXV1FlMRiMnq
pAeJ5jgBovuV2gx8pLYU3ipR0LJTjzz7N39FkAJJyekWWjNVrZ4Ue5IGW/pXKVkN
SjeSrZTtxSmyO8BPya7/xsqjiqo3v7m2jSBLTVEsUtkFEaet4xlAH2OQZBvlTbuI
n5Hc61NkB6qMU5k6We31
=Sfdd
-----END PGP SIGNATURE-----
- [Qemu-devel] [PATCH 07/16] ahci: kick NCQ queue, (continued)
- [Qemu-devel] [PATCH 07/16] ahci: kick NCQ queue, John Snow, 2015/06/22
- [Qemu-devel] [PATCH 08/16] ahci: correct types in NCQTransferState, John Snow, 2015/06/22
- [Qemu-devel] [PATCH 09/16] ahci: correct ncq sector count, John Snow, 2015/06/22
- [Qemu-devel] [PATCH 10/16] qtest/ahci: halted NCQ test, John Snow, 2015/06/22
- [Qemu-devel] [PATCH 01/16] ide: add limit to .prepare_buf(), John Snow, 2015/06/22
- [Qemu-devel] [PATCH 13/16] ahci: add get_cmd_header helper, John Snow, 2015/06/22
- [Qemu-devel] [PATCH 11/16] ahci: add cmd header to ncq transfer state, John Snow, 2015/06/22
- [Qemu-devel] [PATCH 12/16] ahci: ncq migration, John Snow, 2015/06/22
[Qemu-devel] [PATCH 15/16] qtest/ahci: halted ncq migration test, John Snow, 2015/06/22
[Qemu-devel] [PATCH 14/16] ahci: Do not map cmd_fis to generate response, John Snow, 2015/06/22