mirror of
https://github.com/stefanberger/libtpms
synced 2026-08-13 02:17:46 +00:00
tpm2: rev155: Fix a bug in the RSAES decoder checking bounds
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
c1f7bf5509
commit
480d42bb9f
@ -481,7 +481,7 @@ RSAES_Decode(
|
||||
pSize++;
|
||||
// Make sure that pSize has not gone over the end and that there are at least 8
|
||||
// bytes of pad data.
|
||||
fail = (pSize >= coded->size) | fail;
|
||||
fail = (pSize > coded->size) | fail;
|
||||
fail = ((pSize - 2) < 8) | fail;
|
||||
if((message->size < (UINT16)(coded->size - pSize)) || fail)
|
||||
return TPM_RC_VALUE;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user