#9368 Test wrong variable in ipadb_get_pac()
Closed: fixed a year ago by frenaud. Opened a year ago by rjeffman.

After running Covscan the following issue was raised:

1. freeipa-4.9.11/daemons/ipa-kdb/ipa_kdb_mspac.c:1062: cond_notnull: Condition "lentry", taking true branch. Now the value of "lentry" is not "NULL".
2. freeipa-4.9.11/daemons/ipa-kdb/ipa_kdb_mspac.c:1089: notnull: At condition "lentry", the value of "lentry" cannot be "NULL".
3. freeipa-4.9.11/daemons/ipa-kdb/ipa_kdb_mspac.c:1089: dead_error_condition: The condition "!lentry" cannot be true.
4. freeipa-4.9.11/daemons/ipa-kdb/ipa_kdb_mspac.c:1090: dead_error_begin: Execution cannot reach this statement: "kerr = 2;".
#  1088|                   sentry = ldap_first_entry(ipactx->lcontext, sresults);
#  1089|                   if (!lentry) {
#  1090|->                     kerr = ENOENT;
#  1091|                       goto done;
#  1092|                   }

At this point, lentry cannot be NULL, but it seems that the variable that should be tested is sentry.


Metadata Update from @rjeffman:
- Issue assigned to rjeffman

a year ago

master:

  • fd0fd48 Fix "no entry" condition when searching PAC info

ipa-4-10:

  • 8a7c068 Fix "no entry" condition when searching PAC info

ipa-4-9:

  • 9aca7ce Fix "no entry" condition when searching PAC info

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

a year ago

Log in to comment on this ticket.

Metadata