Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-7829

Coverity: wrong condition in ProviderLoaderService.unregisterProviders (Elytron subsystem)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 11.0.0.Alpha1
    • None
    • Security
    • None

    Description

      Coverity static-analysis scan found an issue in a loop within the ProviderLoaderService.unregisterProviders method.

      https://scan7.coverity.com/reports.htm#v16159/p12663/fileInstanceId=6892104&defectInstanceId=1794523&mergedDefectId=1388480&fileStart=1&fileEnd=250
      The condition is wrong in the code

      for (int i = providers.length - 1; i < 0; i--) {
          Security.removeProvider(providers[i].getName());
      }
      

      There should be i >= 0 instead of i < 0.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: