OSDN Git Service

target-s390x: fix possible out of bounds read
authorzhanghailiang <zhang.zhanghailiang@huawei.com>
Mon, 24 Nov 2014 02:47:45 +0000 (10:47 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 10 Dec 2014 08:14:44 +0000 (11:14 +0300)
commit1a71992376792a0d11ea27688bd1a21cdffd1826
tree5bcaca48666429b543e109278b06dde7414d6e00
parentb5369dd841b55aa24dd107223e0a08d8624d1b19
target-s390x: fix possible out of bounds read

Array index starts at 0, so the valid index of ext_queue array,
io_queue array, mchk_queue array should be MAX_EXT_QUEUE - 1,
MAX_IO_QUEUE - 1, MAX_MCHK_QUEUE - 1.

The original checks missed the invalid bound value, which will lead
possible out of bounds read in the follow codes.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target-s390x/helper.c