Whamcloud - gitweb
LU-14535 utils: fix FORWARD_NULL issue from Coverity 27/54827/4
authorHongchao Zhang <hongchao@whamcloud.com>
Sun, 14 Apr 2024 23:13:57 +0000 (07:13 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 21 May 2024 18:39:24 +0000 (18:39 +0000)
commit36a1074ca0225d675c1e3272c07b1f1990e1c3cb
treedaa9df314785954b1aa065ec443c36bfe581378d
parent85fe3cfff866083db8e9b1d72fc7f07e123b6f4c
LU-14535 utils: fix FORWARD_NULL issue from Coverity

Fixing the possible NULL pointer issued reported from Coverity

   case 'e':
CID 424708:    (FORWARD_NULL)
Passing null pointer "optarg" to "strtoul", which dereferences it.
      end_qid = strtoul(optarg, NULL, 0);
      break;

CoverityID: 424708 ("FORWARD NULL")

Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: Idfb5cb4c6fe63ec08dd9048742f3f280b125eb8a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54827
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/utils/lfs.c