X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Futils%2Flibiam.c;h=1b1269613ca61afaaf843091d9c4c97f52e0ce5f;hb=20d7508afa3b6f3ac703b4d43e5b1ad0ba782f19;hp=a5f3173dceed2f1bfaa4f98e763f5615cde84b5a;hpb=e3a7c58aebafce40323db54bf6056029e5af4a70;p=fs%2Flustre-release.git diff --git a/lustre/utils/libiam.c b/lustre/utils/libiam.c index a5f3173..1b12696 100644 --- a/lustre/utils/libiam.c +++ b/lustre/utils/libiam.c @@ -26,6 +26,8 @@ /* * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. + * + * Copyright (c) 2014, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -47,15 +49,11 @@ #include #include #include - +#include #include -#ifdef HAVE_ENDIAN_H -#include -#endif - -#include -#include +#include +#include #include typedef __u32 lvar_hash_t; @@ -349,7 +347,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;