Uploaded image for project: 'WildFly Elytron'
  1. WildFly Elytron
  2. ELY-751

Coverity static analysis: Explicit null dereferenced in LdapKeyStore (Elytron)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 1.1.0.Beta24
    • None
    • None

    Description

      Coverity static-analysis scan found possible use of null object in LdapKeyStore constructor.

      https://scan7.coverity.com/reports.htm#v16159/p11778/fileInstanceId=5760194&defectInstanceId=1541374&mergedDefectId=1369294
      The LdapKeyStore.Builder.build() method constructs the LdapKeyStore instance this way:

        return new LdapKeyStore(spi, null, null);
      

      and the constructor just calls parent ctor:

          protected LdapKeyStore(KeyStoreSpi keyStoreSpi, Provider provider, String type) {
              super(keyStoreSpi, provider, type);
          }
      

      And it fails with NPE if debug for KeyStore is enabled as the constructor contains:

              if (!skipDebug && pdebug != null) {
                  pdebug.println("KeyStore." + type.toUpperCase() + " type from: " +
                      this.provider.getName());
              }
      

      Attachments

        Issue Links

          Activity

            People

              rhn-support-ivassile Ilia Vassilev
              josef.cacek@gmail.com Josef Cacek (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: