This patch against the git tree fixes minor typos, some of them possibily
leading to NULL-pointer dereference in rare conditions.
Signed-off-by: Remi Gacogne <rgacogne-github@coredump.fr>
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
{
case AF_INET:
naddr=&su.sin.sin_addr;
+ break;
#ifdef HAVE_IPV6
case AF_INET6:
naddr=&su.sin6.sin6_addr;
+ break;
#endif
}
return NULL;
len = *length - v->namelen;
- len = (len >= 1 ? sizeof 1 : 0);
+ len = (len >= 1 ? 1 : 0);
if (exact && len != 1)
return NULL;
if (len)
new->nexthop = nexthop;
new->tag = 0;
- rn->info = new;
+ if (rn)
+ rn->info = new;
if (IS_DEBUG_OSPF (lsa, LSA_GENERATE))
zlog_debug ("Redistribute[%s]: %s/%d external info created.",
/* If the lsa's age reached to MaxAge, start flushing procedure. */
if (IS_LSA_MAXAGE (lsa))
{
- lp->flags &= ~LPFLG_LSA_ENGAGED;
+ if (lp)
+ lp->flags &= ~LPFLG_LSA_ENGAGED;
ospf_opaque_lsa_flush_schedule (lsa);
goto out;
}
if (!(ifp->flags & IFF_UP))
return;
- if (!p)
+ if (p)
src = ntohl(p->u.prefix4.s_addr);
else
src = 0; /* Is filled in */