Whamcloud - gitweb
LU-5306: Update download and other whamcloud URLs
[fs/lustre-release.git] / lustre / utils / mount_utils_ldiskfs.c
index 9e1ec14..6df4e45 100644 (file)
@@ -409,7 +409,7 @@ static void disp_old_e2fsprogs_msg(const char *feature, int make_backfs)
                E2FSPROGS, feature);
 #if !(HAVE_LDISKFSPROGS)
        fprintf(stderr, "Please install the latest version of e2fsprogs from\n"
-               "http://downloads.whamcloud.com/public/e2fsprogs/latest/\n"
+               "https://downloads.hpdd.intel.com/public/e2fsprogs/latest/\n"
                "to enable this feature.\n");
 #endif
        if (make_backfs)
@@ -639,6 +639,7 @@ static int enable_default_ext4_features(struct mkfs_opts *mop, char *anchor,
  */
 static char *moveopts_to_end(char *start)
 {
+       size_t len;
        char save[512];
        char *end, *idx;
 
@@ -651,9 +652,13 @@ static char *moveopts_to_end(char *start)
        while (*end != ' ' && *end != '\0')
                ++end;
 
+       len = end - start;
+       if (len >= sizeof(save))
+               len = sizeof(save) - 1;
+
        /* save options */
-       strncpy(save, start, end - start);
-       save[end - start] = '\0';
+       strncpy(save, start, len);
+       save[len] = '\0';
 
        /* move remaining options up front */
        if (*end)