summaryrefslogtreecommitdiff
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorViacheslav Dubeyko <Slava.Dubeyko@ibm.com>2025-06-06 12:05:21 -0700
committerIlya Dryomov <idryomov@gmail.com>2025-10-08 23:30:46 +0200
commit1ed4471a4ee6cfa902467332042158ca5ef8ad24 (patch)
treee9ad98553f80a6fc236b14b52010b4fe6a0643f2 /rust/helpers/helpers.c
parentb7ed1e29cfe773d648ca09895b92856bd3a2092d (diff)
ceph: fix wrong sizeof argument issue in register_session()
The Coverity Scan service has detected the wrong sizeof argument in register_session() [1]. The CID 1598909 defect contains explanation: "The wrong sizeof value is used in an expression or as argument to a function. The result is an incorrect value that may cause unexpected program behaviors. In register_session: The sizeof operator is invoked on the wrong argument (CWE-569)". The patch introduces a ptr_size variable that is initialized by sizeof(struct ceph_mds_session *). And this variable is used instead of sizeof(void *) in the code. [1] https://scan5.scan.coverity.com/#/project-view/64304/10063?selectedIssue=1598909 Signed-off-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com> Reviewed-by: Alex Markuze <amarkuze@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions