#1972 Dereference after a NULL check in tests/common_dom.c
Closed: Fixed None Opened 5 years ago by jhrozek.

136    conf_db = talloc_asprintf(NULL, "%s/%s", tests_path, confdb_path);
137    sys_db = talloc_asprintf(NULL, "%s/%s", tests_path, sysdb_path);

1. Condition "!conf_db", taking true branch

2. var_compare_op: Comparing "conf_db" to null implies that "conf_db" might be null.
138    if (!conf_db || !sys_db) {

3. Condition "debug_level & __debug_macro_newlevel", taking true branch

4. Condition "debug_timestamps", taking true branch

5. Condition "debug_microseconds", taking true branch

6. Falling through to end of if statement

7. Falling through to end of if statement
139        DEBUG(SSSDBG_CRIT_FAILURE,
140              ("Could not construct db paths\n"));
141    }
142
143    errno = 0;

CID 11870: Dereference after null check (FORWARD_NULL)8. var_deref_model: Passing null pointer "conf_db" to function "unlink(char const *)", which dereferences it.
144    ret = unlink(conf_db);

Fields changed

owner: somebody => lslebodn

Fields changed

coverity: 11870 => 11870,11871

Coverity bug can shortcut to the current milestone without triage.

patch: 0 => 1
resolution: => fixed
status: new => closed

This ticket was fixed in 1.10 beta but was stuck in triage.

milestone: NEEDS_TRIAGE => SSSD 1.10 beta

Fields changed

rhbz: => 0

Metadata Update from @jhrozek:
- Issue assigned to lslebodn
- Issue set to the milestone: SSSD 1.10 beta

2 years ago

Login to comment on this ticket.

Metadata