Loading
bdev_nvme: trid initialization and NULL terminated trid->subnqn
The patch is created to address issues discovered by Coverity scan. The struct spdk_nvme_transport_id trid was declared, but not initialized. In spdk_nvme_transport_id_compare() function the trid.trstring was used if the transport was specified as SPDK_NVME_TRANSPORT_CUSTOM, which may lead to undesired effects as it was not initialized in this place. Now it will point to empty string. It was also possible that trid->subnqn was not NULL-terminated, which was wrong. Now it is corrected. Change-Id: I750f58a7ae39ab3179cc2e793cd8059bdacd234d Signed-off-by:Marcin Spiewak <marcin.spiewak@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18143 Community-CI: Mellanox Build Bot Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com> Reviewed-by:
Konrad Sztyber <konrad.sztyber@intel.com>