Whamcloud - gitweb
LU-4629 libcfs: fix buffer overflow of string buffer
[fs/lustre-release.git] / lustre / utils / libiam.c
index 9b64c61..704601e 100644 (file)
@@ -348,7 +348,7 @@ static char *iam_convert(int size, int need_convert, char *source)
                         free(opt);
                 }
         } else {
-                strncpy(ptr, source, size + 1);
+               strlcpy(ptr, source, size + 1);
         }
 
         return ptr;