X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Futils%2Fliblustreapi_util.c;h=f0f199108297dad0d1ce930f5911d857947b6816;hb=2f8d7b4679de3fa467040aa61733f262714e39c9;hp=fbc75422bf1ab195a5d8b5c847eb02022d5f098f;hpb=e954d93f264d8ae559cbd41ed6d7b977674dd42b;p=fs%2Flustre-release.git diff --git a/lustre/utils/liblustreapi_util.c b/lustre/utils/liblustreapi_util.c index fbc7542..f0f1991 100644 --- a/lustre/utils/liblustreapi_util.c +++ b/lustre/utils/liblustreapi_util.c @@ -41,7 +41,6 @@ #include #include #include -#include /* only needed for compat strlcpy() */ #include /* only until LUSTRE_VERSION_CODE is gone */ #include "lustreapi_internal.h" @@ -137,7 +136,7 @@ int llapi_get_version_string(char *version, unsigned int version_size) return -1; } - if (strlcpy(version, ptr, version_size) >= version_size) { + if (snprintf(version, version_size, "%s", ptr) >= version_size) { errno = EOVERFLOW; return -1; }