diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2009-02-07 17:58:22 -0600 |
---|---|---|
committer | Mike Christie <michaelc@cs.wisc.edu> | 2009-02-07 17:58:22 -0600 |
commit | c9f9edd2d6e31f025384c8830743d2df2edd825f (patch) | |
tree | 59cad46a55d6f4301363321ce1b7d4b07b27b21b /usr/iface.c | |
parent | c4fab650136590fb6d6b4c612aa429d1d398caad (diff) | |
download | open-iscsi-c9f9edd2d6e31f025384c8830743d2df2edd825f.tar.gz |
iscsi tools: convert from strncpy to strlcpy
This has us use a safer strlcpy instead of strncpy when we can.
Diffstat (limited to 'usr/iface.c')
-rw-r--r-- | usr/iface.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr/iface.c b/usr/iface.c index 7a4d6d2..4f83793 100644 --- a/usr/iface.c +++ b/usr/iface.c @@ -36,6 +36,7 @@ #include "idbm.h" #include "iface.h" #include "session_info.h" +#include "sysdeps.h" /* * Default ifaces for use with transports that do not bind to hardware @@ -115,7 +116,7 @@ struct iface_rec *iface_alloc(char *ifname, int *err) return NULL; } - strncpy(iface->name, ifname, ISCSI_MAX_IFACE_LEN); + strlcpy(iface->name, ifname, ISCSI_MAX_IFACE_LEN); INIT_LIST_HEAD(&iface->list); return iface; } |