#1811 Unchecked return value in tests
Closed: Fixed None Opened 11 years ago by jhrozek.

Assigning: "dom" = return value from "find_domain_by_id(domains, NULL)".
302    dom = find_domain_by_id(domains, NULL);
"dom" has its value checked in "dom == NULL".
303    fail_unless(dom == NULL, "Domain returned without search domain.");
304
305    dom = find_domain_by_id(domains, "DOES-NOT_EXISTS");
306    fail_unless(dom == NULL, "Domain returned with non existing id.");
307
308    for (c = 0; c < NUM_DOMAINS; c++) {
309        id = talloc_asprintf(global_talloc_context, "ID-of-domains-%zu", c);
310        fail_unless(id != NULL, "talloc_asprintf failed.\n");
311
CID 13136: Dereference null return value (NULL_RETURNS)Function "find_domain_by_id" returns null (checked 6 out of 7 times). [show details]
Assigning: "dom" = null return value from "find_domain_by_id".
312        dom = find_domain_by_id(domains, id);
Dereferencing a null pointer "dom".
313        fail_unless((strcmp(dom->domain_id, id) == 0),
314                    "Wrong domain returned for id [%s].", id);

Coverity issue, doesn't need a clone

rhbz: => 0

Fields changed

milestone: NEEDS_TRIAGE => SSSD 1.10 beta

Fields changed

owner: somebody => okos
patch: 0 => 1
status: new => assigned

resolution: => fixed
review: => 0
status: assigned => closed

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

7 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/2853

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Login to comment on this ticket.

Metadata