Fix: tracker: NULL pointer dereference after NULL check
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 31 Mar 2020 02:10:36 +0000 (22:10 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 31 Mar 2020 18:01:42 +0000 (14:01 -0400)
commit74fdbc6f7d4268216e3295f3e43236fee9dc5f1d
tree124b77cbb6c4714a220d1dc8d6d5d5ab49424ece
parentec14a211ba85bb7d15f22affebcc5fdd76b1b9c0
Fix: tracker: NULL pointer dereference after NULL check

value_view can be NULL and must thus be checked before use.

Moreover, the fix introduced in 1ad5cb59 is erreneous: the
function must validate that either:
  - value is a 'name' type, value_view is not null, and not len == 0,
  - value is an integer and value_view does not contain more data.

In process_attr_value_from_comm: Pointer is checked against null but
then dereferenced anyway (CWE-476)

Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ia130ef57e10118960f1023338b90f7a10d588ee2
src/common/tracker.c
This page took 0.025535 seconds and 4 git commands to generate.