Whamcloud - gitweb
LU-17718 obdclass: potential string overflow upcall_cache.c 10/54710/6
authorSebastien Buisson <sbuisson@ddn.com>
Tue, 9 Apr 2024 13:00:41 +0000 (15:00 +0200)
committerOleg Drokin <green@whamcloud.com>
Wed, 5 Jun 2024 04:50:54 +0000 (04:50 +0000)
commit7869bb320e735547410a7d3e31061b9044389c53
treee6df179cc8527ecf5441adc0ab6069b65daa89fd
parentac04484c1beec9f46d1256e8ea236f24073344af
LU-17718 obdclass: potential string overflow upcall_cache.c

Use strncpy() in upcall_cache_set_upcall() to quiet Coverity warning.
And reorganize the function so that the code flow is more linear in
the success case.

CoverityID: 424705: ("String overflow")

Fixes: 2153e86541 ("LU-17497 obdclass: check upcall incorrect values")
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I1aee77f78c92c6c571dfe358435a2733cc3ba9d9
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54710
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Aurelien Degremont <adegremont@nvidia.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/obdclass/upcall_cache.c
lustre/tests/sanity-sec.sh