diff options
author | Gary V. Vaughan <gary@gnu.org> | 2014-10-26 21:50:06 +0000 |
---|---|---|
committer | Gary V. Vaughan <gary@gnu.org> | 2014-10-27 11:22:00 +0000 |
commit | 54f6055601d8391bd473508704db69fc677e7e28 (patch) | |
tree | c65f373f2819c9b434a0962a44df69cf9211171f | |
parent | 6b02c1fb4b5f91316c8e19d8506990ca6a7915e1 (diff) | |
download | libtool-54f6055601d8391bd473508704db69fc677e7e28.tar.gz |
syntax-check: use strlcpy instead of strncpy.
* libltdl/loaders/dyld.c (vm_sym): Use strlcpy to pacify syntax
checks.
* libltdl/ltdl.c (try_dlopen): Likewise.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
-rw-r--r-- | libltdl/loaders/dyld.c | 2 | ||||
-rw-r--r-- | libltdl/ltdl.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libltdl/loaders/dyld.c b/libltdl/loaders/dyld.c index 7d7cd217..3ee73548 100644 --- a/libltdl/loaders/dyld.c +++ b/libltdl/loaders/dyld.c @@ -350,7 +350,7 @@ vm_sym (lt_user_data loader_data, lt_module module, const char *name) if (!nssym) { - strncpy (saveError, dylderror (LT__STRERROR (SYMBOL_NOT_FOUND)), 255); + strlcpy (saveError, dylderror (LT__STRERROR (SYMBOL_NOT_FOUND)), 255); saveError[255] = 0; if (!mh) { diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 098f9a68..9c02afc1 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -1240,7 +1240,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext, goto cleanup; } - strncpy (dir, canonical, dirlen); + strlcpy (dir, canonical, dirlen); dir[dirlen] = LT_EOS_CHAR; ++base_name; |