2005-05-20 Sergei Organov <osv@topconrd.ru>

PR 749/networking
	* rtems/rtems_showroute.c: Avoid NULL dereference.
This commit is contained in:
Joel Sherrill
2005-05-20 19:19:17 +00:00
parent c3f26834d6
commit c230bc312d
2 changed files with 6 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
2005-05-20 Sergei Organov <osv@topconrd.ru>
PR 749/networking
* rtems/rtems_showroute.c: Avoid NULL dereference.
2004-09-17 Till Strauman <strauman@slac.stanford.edu>
PR 676/networking

View File

@@ -128,7 +128,7 @@ show_inet_route (rn, vw)
r->pksent = rt->rt_rmx.rmx_pksent;
r->expire = rt->rt_rmx.rmx_expire;
ifp = rt->rt_ifp;
strncpy (r->ifname, ifp->if_name, sizeof r->ifname);
strncpy (r->ifname, (ifp->if_name ? ifp->if_name : ""), sizeof r->ifname);
r->ifunit = ifp->if_unit;
return 0;
}