]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/kern/socket_info.c
xnu-1228.5.18.tar.gz
[apple/xnu.git] / bsd / kern / socket_info.c
index 01ab24d711005a365db635172f74a7a305ab254d..e6e41f92b12968af39abda28e1b074467a44d7d8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2005-2006 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
@@ -191,7 +191,7 @@ fill_socketinfo(struct socket *so, struct socket_info *si)
                                
                                ndrvsi->ndrvsi_if_family = ifp->if_family;
                                ndrvsi->ndrvsi_if_unit = ifp->if_unit;
-                               strncpy(ndrvsi->ndrvsi_if_name, ifp->if_name, IFNAMSIZ);
+                               strlcpy(ndrvsi->ndrvsi_if_name, ifp->if_name, IFNAMSIZ);
                        }
 
                        break;
@@ -223,7 +223,7 @@ fill_socketinfo(struct socket *so, struct socket_info *si)
                                kcsi->kcsi_recvbufsize = kctl->recvbufsize;
                                kcsi->kcsi_sendbufsize = kctl->sendbufsize;
                                kcsi->kcsi_unit = kcb->unit;
-                               strncpy(kcsi->kcsi_name, kctl->name, MAX_KCTL_NAME);
+                               strlcpy(kcsi->kcsi_name, kctl->name, MAX_KCTL_NAME);
                        }
                        break;