Skip to content
Commit ce042c18 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jens Axboe
Browse files

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: 455a7b23 ("block: Add Sed-opal library")
Reviewed-by: default avatarScott Bauer <scott.bauer@intel.com>
Tested-by: default avatarScott Bauer <scott.bauer@intel.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent a1e79188
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment