Fix: sessiond: error accounting: wrong sizeof argument cpu_counters
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 7 Apr 2021 16:54:09 +0000 (12:54 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 7 Apr 2021 16:56:02 +0000 (12:56 -0400)
commit477b83a4de8580a75e3aa88de423c7081e49d6e0
treebc33b1aa42d1451a34386f604805783569b3058b
parentecc7ed07fdfd1469f4b3c087e55cbae75f481e58
Fix: sessiond: error accounting: wrong sizeof argument cpu_counters

`cpu_counters` is an array of `struct lttng_ust_abi_object_data *`, not
of `struct lttng_ust_abi_object_data`. This didn't cause any problems
since the structure is larger than a pointer.

1452203 Wrong sizeof argument

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 event_notifier_error_accounting_register_app: The sizeof operator is invoked on the wrong argument (CWE-569)

Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I9278949aab0a98f050ec232d7b8ce024240020d0
src/bin/lttng-sessiond/event-notifier-error-accounting.c
This page took 0.025813 seconds and 4 git commands to generate.