Using malloc'ed string for string in iSCSI target has caused scan-build error. Maximum size of target name is already defined to be MAX_TARGET_NAME, and hence use fixed size string whose size is MAX_TARGET_NAME + 1 for spdk_iscsi_tgt_node::name. Change psdk_iscsi_tgt_node::alias together. This change will reduce the potential malloc failure. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Iac4cd6e9d60173ddeb68ca21ce712126c13bc3c4 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459707 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> |
||
---|---|---|
.. | ||
.gitignore | ||
Makefile | ||
tgt_node_ut.c | ||
tgt_node.conf |