mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-19 09:53:01 +00:00
DM: vrpmb: replace assert() with return false
Replace assert() with explicit parameter checking and error handling. Tracked-On: #3252 Signed-off-by: Qi Yadong <yadong.qi@intel.com> Acked-by: Zhu Bing <bing.zhu@intel.com>
This commit is contained in:
parent
66943be353
commit
8426db9309
@ -56,7 +56,10 @@ int get_vrpmb_key(uint8_t *out, size_t size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
assert(size == RPMB_KEY_LEN);
|
||||
if (size != RPMB_KEY_LEN) {
|
||||
fprintf(stderr, "%s: Invalid input key size\n", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( vrkey.initialized == false ) {
|
||||
for (i = 0; i < DRNG_MAX_RETRIES; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user