From 5c1af4caf08eda392e317ece5828b6e6eb2abe43 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 20 May 2005 19:18:55 +0000 Subject: 2005-05-20 Sergei Organov PR 749/networking * libnetworking/rtems/rtems_showroute.c: Avoid NULL dereference. --- cpukit/libnetworking/rtems/rtems_showroute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpukit/libnetworking') 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; } -- cgit v1.2.3