Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux: avoid segfault in check-tls-key due to null hostnqn/subsysnqn
Running nvme check-tls-key hits a segfault as seen below: nvme check-tls-key -d NVMeTLSkey-1:01:bB7soUnpHfxVg53sCY21KY3nLbqLit2RcIO8Rbdf3mKhcKaM: Segmentation fault (core dumped) This is because the strlen check on subsysnqn or hostnqn crashes at src/nvme/linux.c due to either of them being null. Avoid this segfault by checking these strings before running a strlen on them. Signed-off-by: Martin George <[email protected]>
- Loading branch information