Whamcloud - gitweb
LU-17000 llite: Handle not NUL terminated buffer 77/55377/5
authorArshad Hussain <arshad.hussain@aeoncomputing.com>
Mon, 10 Jun 2024 08:15:41 +0000 (04:15 -0400)
committerOleg Drokin <green@whamcloud.com>
Tue, 27 May 2025 04:04:04 +0000 (04:04 +0000)
commit517e76cbefe800251d6d132c7f1d8a0d965d089e
tree1a51c6f887a2baaa518e91113147ebbb91fd30d7
parent373b76b345b5eaa21b201315075f01ccfc408189
LU-17000 llite: Handle not NUL terminated buffer

In pcc_expr_time_parse() 'buf' may not have a null
terminator if the source string's length is equal
to the buffer. This patch handles this.

Test-Parameters: trivial testlist=sanity-pcc
CoverityID: 426259 ("Buffer not null terminated")
Fixes: 3835f4d3 (LU-13881 pcc: comparator support for PCC rules)
Signed-off-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Change-Id: Ifc144d73c75b8eef25a994630c600b9c1922aa3b
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55377
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/llite/pcc.c