commit | ce042c183bcb94eb2919e8036473a1fc203420f9 | [log] [tgz] |
---|---|---|
author | Dan Carpenter <dan.carpenter@oracle.com> | Wed Jun 20 13:41:51 2018 +0300 |
committer | Jens Axboe <axboe@kernel.dk> | Wed Jun 20 12:04:06 2018 -0600 |
tree | cc88e5d4ee53d4aee85e5607b1e98a9dae5de2cf | |
parent | a1e79188628580465ac6d7a93a313336ee3364f1 [diff] |
block: sed-opal: Fix a couple off by one bugs resp->num is the number of tokens in resp->tok[]. It gets set in response_parse(). So if n == resp->num then we're reading beyond the end of the data. Fixes: 455a7b238cd6 ("block: Add Sed-opal library") Reviewed-by: Scott Bauer <scott.bauer@intel.com> Tested-by: Scott Bauer <scott.bauer@intel.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>