* libltdl/ltdl.c (trim): Use memcpy instead of strncpy here, to

avoid problems with non-conforming strncpy.  This is safe here.
This commit is contained in:
Ralf Wildenhues 2004-11-29 21:06:24 +00:00
parent 60fbf440cb
commit 5272d7fb5e
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2004-11-29 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/ltdl.c (trim): Use memcpy instead of strncpy here, to
avoid problems with non-conforming strncpy. This is safe here.
* m4/ltdl.m4 (LT_LIB_DLLOAD): Define HAVE_LIBDLLOADER if we
have a dlloader to preload.
* libltdl/ltdl.c (lt_dlinit): Only preload if HAVE_LIBDLLOADER, only

View File

@ -907,7 +907,7 @@ trim (char **dest, const char *str)
if (!tmp)
return 1;
strncpy(tmp, &str[1], (end - str) - 1);
memcpy(tmp, &str[1], (end - str) - 1);
tmp[len-3] = LT_EOS_CHAR;
*dest = tmp;
}