diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2005-05-20 19:18:55 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2005-05-20 19:18:55 +0000 |
commit | 5c1af4caf08eda392e317ece5828b6e6eb2abe43 (patch) | |
tree | 43413ad48fc11fe8471cc91a96f83089a80f6518 /cpukit/libnetworking | |
parent | 2005-05-14 Sergei Organov <osv@topconrd.ru> (diff) | |
download | rtems-5c1af4caf08eda392e317ece5828b6e6eb2abe43.tar.bz2 |
2005-05-20 Sergei Organov <osv@topconrd.ru>
PR 749/networking
* libnetworking/rtems/rtems_showroute.c: Avoid NULL dereference.
Diffstat (limited to 'cpukit/libnetworking')
-rw-r--r-- | cpukit/libnetworking/rtems/rtems_showroute.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/libnetworking/rtems/rtems_showroute.c b/cpukit/libnetworking/rtems/rtems_showroute.c index ea63ae8e36..871b8263eb 100644 --- a/cpukit/libnetworking/rtems/rtems_showroute.c +++ b/cpukit/libnetworking/rtems/rtems_showroute.c @@ -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; } |