key: return proper value and avoid leak
PATCH 1/1 key: return proper value and avoid leak
The return value was incorrect for bool. The code should also go to 'done' to free sig_hash.
--- ell/key.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
ell/key.c +4 -2
@@ -603,8 +603,10 @@ LIB_EXPORT bool l_key_verify(struct l_key *key,uint8_t *sig_hash =l_malloc (len_sig);/* Other checksum types are not yet supported */ -if (checksum !=L_CHECKSUM_NONE ) -return -EINVAL ; +if (checksum !=L_CHECKSUM_NONE ) { + success = false; + goto done; + }/* The keyctl verify implementation compares the verify results * before we get a chance to unpad it. Instead, use the *encrypt*
Signature · 1 line
2.9.3
Denis Kenzior
AppliedHi Thomas,
Quoted 6 lines · Thomas Hindoe Paaboel Andersen
The return value was incorrect for bool. The code should also go to 'done' to free
sig_hash.--- ell/key.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Applied, thanks.
Regards,
-Denis