summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/libnetworking/ChangeLog5
-rw-r--r--cpukit/libnetworking/rtems/rtems_showroute.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/cpukit/libnetworking/ChangeLog b/cpukit/libnetworking/ChangeLog
index 35090b2cf4..6777ab722d 100644
--- a/cpukit/libnetworking/ChangeLog
+++ b/cpukit/libnetworking/ChangeLog
@@ -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
diff --git a/cpukit/libnetworking/rtems/rtems_showroute.c b/cpukit/libnetworking/rtems/rtems_showroute.c
index c0d0b231e8..b963c5f518 100644
--- a/cpukit/libnetworking/rtems/rtems_showroute.c
+++ b/cpukit/libnetworking/rtems/rtems_showroute.c
@@ -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;
}