[jboss-jira] [JBoss JIRA] (ELY-846) Coverity: dereference null value in PermissionMapperDefinitions (Elytron subsystem)

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


Josef Cacek created ELY-846:
-------------------------------

             Summary: Coverity: dereference null value in PermissionMapperDefinitions (Elytron subsystem)
                 Key: ELY-846
                 URL: https://issues.jboss.org/browse/ELY-846
             Project: WildFly Elytron
          Issue Type: Bug
            Reporter: Josef Cacek
            Assignee: Darran Lofthouse


Coverity static-analysis scan found a possilbe method call on null object in the {{PermissionMapperDefinitions.createPermission}} method.

https://scan7.coverity.com/reports.htm#v16159/p12663/fileInstanceId=6892117&defectInstanceId=1794524&mergedDefectId=1388481

{code:java}
Module currentModule = Module.getCallerModule();
if (permission.getModule() != null) {
    ModuleIdentifier mi = ModuleIdentifier.fromString(permission.getModule());
    try {
        currentModule = currentModule.getModule(mi);
{code}

The {{currentModule}} value returned from {{Module.getCallerModule()}} may be {{null}}. The {{getModule()}} method is called on it without the null-check.





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


More information about the jboss-jira mailing list