[jboss-jira] [JBoss JIRA] (ELY-842) Coverity: wrong condition in ProviderLoaderService.unregisterProviders (Elytron subsystem)

Josef Cacek (JIRA) issues at jboss.org
Fri Dec 16 07:13:00 EST 2016


Josef Cacek created ELY-842:
-------------------------------

             Summary: Coverity: wrong condition in ProviderLoaderService.unregisterProviders (Elytron subsystem)
                 Key: ELY-842
                 URL: https://issues.jboss.org/browse/ELY-842
             Project: WildFly Elytron
          Issue Type: Bug
            Reporter: Josef Cacek
            Assignee: Darran Lofthouse
            Priority: Critical


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
{code:java}
for (int i = providers.length - 1; i < 0; i--) {
    Security.removeProvider(providers[i].getName());
}
{code}

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




--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list