Commit 21f33dad authored by GUO Zihua's avatar GUO Zihua Committed by Zheng Zengkai
Browse files

KEYS: Fix error path return value in pgp_generate_fingerprint

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5GRSV


CVE: NA

--------------------------------

In function pgp_generate_fingerprint, return value is not set correctly
shall kmalloc failed, leading to the caller triggering a read out-of-bound
while reading ctx.fingerprint or ctx.raw_fingerprint.

This patch fixes this issue by setting correct return value on the error
path.

Fixes: 4006f47d ("KEYS: PGP data parser")
Signed-off-by: default avatarGUO Zihua <guozihua@huawei.com>
Reviewed-by: default avatarRoberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent ce505923
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment