There was no check on the length of the pool name, so it could be
silently truncated when used.
Signed-off-by: frank zago <fzago@cray.com>
Change-Id: Ic18d28a4572ce54c39b35c3ea130ccbfdf33b34d
Reviewed-on: http://review.whamcloud.com/13241
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
return CMD_HELP;
}
+ if (pool_name_arg && strlen(pool_name_arg) > LOV_MAXPOOLNAME) {
+ fprintf(stderr,
+ "error: %s: pool name '%s' is too long (max is %d characters)\n",
+ argv[0], pool_name_arg, LOV_MAXPOOLNAME);
+ return CMD_HELP;
+ }
+
/* get the stripe size */
if (stripe_size_arg != NULL) {
result = llapi_parse_size(stripe_size_arg, &st_size,