mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
radius: Fix NULL dereference issue on allocation failure
In case memory allocation fails, data->pac_opaque_encr_key may be NULL and lead to possible crash. Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
This commit is contained in:
parent
f826fb1de1
commit
4457f41b54
@ -1711,8 +1711,10 @@ radius_server_init(struct radius_server_conf *conf)
|
||||
data->ipv6 = conf->ipv6;
|
||||
if (conf->pac_opaque_encr_key) {
|
||||
data->pac_opaque_encr_key = os_malloc(16);
|
||||
os_memcpy(data->pac_opaque_encr_key, conf->pac_opaque_encr_key,
|
||||
16);
|
||||
if (data->pac_opaque_encr_key) {
|
||||
os_memcpy(data->pac_opaque_encr_key,
|
||||
conf->pac_opaque_encr_key, 16);
|
||||
}
|
||||
}
|
||||
if (conf->eap_fast_a_id) {
|
||||
data->eap_fast_a_id = os_malloc(conf->eap_fast_a_id_len);
|
||||
|
Loading…
Reference in New Issue
Block a user