Commit 886e6e24 authored by GUO Zihua's avatar GUO Zihua Committed by Zheng Zengkai
Browse files

KEYS: Fix mistaken sizeof call in pgp_key_generate_id

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


CVE: NA

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

pgp_key_generate_id() is trying get the size of a flexible length
structure, however the sizeof() is called on the pointer itself.
Besides, considering it's trying to get the size of a flexible length
structure, use struct_size() instead.

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 a176b3de
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment