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

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

XMLWordPrintable

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

      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.

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

                Created:
                Updated:
                Resolved: