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

PR 749/networking
	* libnetworking/rtems/rtems_showroute.c: Avoid NULL dereference.
This commit is contained in:
Joel Sherrill
2005-05-20 19:18:55 +00:00
parent 80f2885b70
commit 5c1af4caf0
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
* libnetworking/rtems/rtems_showroute.c: Avoid NULL dereference.
2005-05-14 Sergei Organov <osv@topconrd.ru>
PR 746/rtems

View File

@@ -132,7 +132,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;
}