mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 07:37:54 +00:00
lib: Fix SA issue with stream s read
We were checking for non-null of 'struct stream *s' after we did a stream_getl, which would have crashed the program. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
e46538e628
commit
c28e5b2a83
@ -1146,11 +1146,15 @@ struct interface *
|
||||
zebra_interface_link_params_read (struct stream *s)
|
||||
{
|
||||
struct if_link_params *iflp;
|
||||
uint32_t ifindex = stream_getl (s);
|
||||
ifindex_t ifindex;
|
||||
|
||||
assert (s);
|
||||
|
||||
ifindex = stream_getl (s);
|
||||
|
||||
struct interface *ifp = if_lookup_by_index (ifindex);
|
||||
|
||||
if (ifp == NULL || s == NULL)
|
||||
if (ifp == NULL)
|
||||
{
|
||||
zlog_err ("%s: unknown ifindex %u, shouldn't happen",
|
||||
__func__, ifindex);
|
||||
|
Loading…
Reference in New Issue
Block a user