SHA256
1
0
forked from pool/ibmswtpm2
ibmswtpm2/ibmswtpm2-fix-empty-decrypt.patch

14 lines
549 B
Diff
Raw Normal View History

Index: ibmswtpm2-1119/src/CryptRsa.c
===================================================================
--- ibmswtpm2-1119.orig/src/CryptRsa.c
+++ ibmswtpm2-1119/src/CryptRsa.c
@@ -469,7 +469,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;