mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
Fix potential memory leak in KeyBlockVerify()
BUG=none TEST=none Change-Id: I17f1cff7d6f750dfd862d71941c6b8cfec57b6bf Reviewed-on: https://gerrit.chromium.org/gerrit/22312 Commit-Ready: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org> Tested-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
@@ -280,6 +280,7 @@ int KeyBlockVerify(const VbKeyBlockHeader* block, uint64_t size,
|
||||
/* Make sure advertised signature data sizes are sane. */
|
||||
if (block->key_block_size < sig->data_size) {
|
||||
VBDEBUG(("Signature calculated past end of the block\n"));
|
||||
RSAPublicKeyFree(rsa);
|
||||
return VBOOT_KEY_BLOCK_INVALID;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user