Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • BIND BIND
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 522
    • Issues 522
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 99
    • Merge requests 99
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source Projects
  • BINDBIND
  • Issues
  • #167

Closed
Open
Created Mar 19, 2018 by Ghost User@ghost

coverity: Dereferencing a null pointer in lib/dns/tests/rbt_test.c

** CID 1430161:    (NULL_RETURNS)
/lib/dns/tests/rbt_test.c: 1142 in atfu_rbt_addname_body()
/lib/dns/tests/rbt_test.c: 1153 in atfu_rbt_addname_body()


________________________________________________________________________________________________________
*** CID 1430161:    (NULL_RETURNS)
/lib/dns/tests/rbt_test.c: 1142 in atfu_rbt_addname_body()
1136            result = dns_test_begin(NULL, ISC_TRUE);
1137            ATF_CHECK_EQ(result, ISC_R_SUCCESS);
1138
1139            ctx = test_context_setup();
1140
1141            n = isc_mem_get(mctx, sizeof(size_t));
>>>     CID 1430161:    (NULL_RETURNS)
>>>     Dereferencing a null pointer "n".
1142            *n = 1;
1143
1144            dns_test_namefromstring("d.e.f.g.h.i.j.k", &fname);
1145            name = dns_fixedname_name(&fname);
1146
1147            /* Add a name that doesn't exist */
/lib/dns/tests/rbt_test.c: 1153 in atfu_rbt_addname_body()
1147            /* Add a name that doesn't exist */
1148            result = dns_rbt_addname(ctx->rbt, name, n);
1149            ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
1150
1151            /* Now add again, should get ISC_R_EXISTS */
1152            n = isc_mem_get(mctx, sizeof(size_t));
>>>     CID 1430161:    (NULL_RETURNS)
>>>     Dereferencing a null pointer "n".
1153            *n = 2;
1154            result = dns_rbt_addname(ctx->rbt, name, n);
1155            ATF_REQUIRE_EQ(result, ISC_R_EXISTS);
1156            isc_mem_put(mctx, n, sizeof(size_t));
1157
1158            test_context_teardown(ctx);
Assignee
Assign to
Time tracking