Commit 38d75b56 authored by Ben Walker's avatar Ben Walker Committed by Daniel Verkamp
Browse files

blobfs: Remove all uses of strncpy



strncpy is going to be added to the list of banned functions because
it does not guarantee strings are null terminated.

Change-Id: I14e2ce65401bbdb77260627e94aa936797c20ce0
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/407020


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 7b822323
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -496,7 +496,7 @@ spdk_fs_init(struct spdk_bs_dev *dev, struct spdk_blobfs_opts *opt,
	args->fs = fs;

	spdk_bs_opts_init(&opts);
	strncpy(opts.bstype.bstype, "BLOBFS", SPDK_BLOBSTORE_TYPE_LENGTH);
	snprintf(opts.bstype.bstype, sizeof(opts.bstype.bstype), "BLOBFS");
	if (opt) {
		opts.cluster_sz = opt->cluster_sz;
	}