X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Futils%2Flibiam.c;h=1b1269613ca61afaaf843091d9c4c97f52e0ce5f;hp=9b64c6170a87dfd609906d3a1172b7861af46e91;hb=5fbb786b96b7db3a977dd8a8fca9a40f52f66b82;hpb=281671b5ee43c2aea5d5b708aadf10fd1df45b16 diff --git a/lustre/utils/libiam.c b/lustre/utils/libiam.c index 9b64c61..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,14 +49,11 @@ #include #include #include - +#include #include -#ifdef HAVE_ENDIAN_H -#include -#endif - -#include +#include +#include #include typedef __u32 lvar_hash_t; @@ -348,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;