Re: [Qemu-devel] [PATCH v3 2/8] job: Fix off-by-one assert checks for JobSTT and JobVerbTable

2018-10-09 Thread John Snow
On 08/31/2018 02:16 PM, Liam Merwick wrote: > In the assert checking the array dereference of JobVerbTable[verb] > in job_apply_verb() the check of the index, verb, allows an overrun > because an index equal to the array size is permitted. > > Similarly, in the assert check of JobSTT[s0][s1]

[Qemu-devel] [PATCH v3 2/8] job: Fix off-by-one assert checks for JobSTT and JobVerbTable

2018-08-31 Thread Liam Merwick
In the assert checking the array dereference of JobVerbTable[verb] in job_apply_verb() the check of the index, verb, allows an overrun because an index equal to the array size is permitted. Similarly, in the assert check of JobSTT[s0][s1] with index s1 in job_state_transition(), an off-by-one