Open nevelis opened 3 years ago
COSE_Encrypt_GetContent() returns a valid pointer to the content, but the length parameter is set to 0.
The reason for this is because cbOut is set to the correct value, but is then used as the remaining bytes in the EVP functions and gets set to 0.
This PR sets the output parameter to the correct value, so we can use the payload safely.
Coverage decreased (-0.4%) to 89.348% when pulling 08b55fa7b730434da2ecd072bc7dcb8e370791d8 on selfienetworks:fix-decrypt-length into 97d1805e71b7a6770093c5e6790d46611680d563 on cose-wg:master.
COSE_Encrypt_GetContent() returns a valid pointer to the content, but the length parameter is set to 0.
The reason for this is because cbOut is set to the correct value, but is then used as the remaining bytes in the EVP functions and gets set to 0.
This PR sets the output parameter to the correct value, so we can use the payload safely.