Whamcloud - gitweb
LU-17137 utils: l_getidentity Coverity cleanup 15/53315/3
authorShaun Tancheff <shaun.tancheff@hpe.com>
Mon, 4 Dec 2023 10:42:41 +0000 (04:42 -0600)
committerOleg Drokin <green@whamcloud.com>
Wed, 20 Dec 2023 01:56:13 +0000 (01:56 +0000)
commitb6bc40c1048415644f202f135ec6ac81eeeed450
tree763236334bb87f46dc5f35cde8acceed4f9becdb
parent76eddbeeace4684507650652ce4fa343c2d14e1a
LU-17137 utils: l_getidentity Coverity cleanup

Do not assign newmod a value past the end of the allocated
space. This can confuse coverity.

Instead only assign valid addresses (or NULL).

CoverityID: 410235 ("Memory - illegal access")

Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I767ed1273ebfab68d634b3ff22b81a4621405dd2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53315
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/utils/l_getidentity.c