From: Ralf Wildenhues Date: Mon, 29 Nov 2004 21:06:24 +0000 (+0000) Subject: * libltdl/ltdl.c (trim): Use memcpy instead of strncpy here, to X-Git-Tag: release-2-1b~833 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5272d7fb5e75acb64e474cadb856ca2d45c5dc20;p=thirdparty%2Flibtool.git * libltdl/ltdl.c (trim): Use memcpy instead of strncpy here, to avoid problems with non-conforming strncpy. This is safe here. --- diff --git a/ChangeLog b/ChangeLog index c1d74a270..7f753a8f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-11-29 Ralf Wildenhues + * 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 diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index fcbdc7cad..c2be79791 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -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; }