summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpukit/ChangeLog5
-rw-r--r--cpukit/libnetworking/rtems/rtems_showroute.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 6cc1789bb0..8bd7071c0f 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -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
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;
}