mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 02:30:52 +00:00
lib: Link State memory corruption
In function ls_find_subnet(), prefix argument is directly copied into subnet.key structure to find corresponding subnet in RB Tree. This could leadr to a memory corruption. Function prefix_copy() must be used instead. This patch replaces the direct prefix copy by a call to prefix_copy() function to avoid this memory issue. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com> Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
This commit is contained in:
parent
3b8686f64c
commit
719b26901c
@ -951,7 +951,7 @@ struct ls_subnet *ls_find_subnet(struct ls_ted *ted, const struct prefix prefix)
|
||||
{
|
||||
struct ls_subnet subnet = {};
|
||||
|
||||
subnet.key = prefix;
|
||||
prefix_copy(&subnet.key, &prefix);
|
||||
return subnets_find(&ted->subnets, &subnet);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user