[jboss-jira] [JBoss JIRA] (ELY-612) Missing or unnecessary null check in AbstractDigestMechanism

David Lloyd (JIRA) issues at jboss.org
Fri Jul 29 11:25:01 EDT 2016


     [ https://issues.jboss.org/browse/ELY-612?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Lloyd resolved ELY-612.
-----------------------------
    Resolution: Done


> Missing or unnecessary null check in AbstractDigestMechanism
> ------------------------------------------------------------
>
>                 Key: ELY-612
>                 URL: https://issues.jboss.org/browse/ELY-612
>             Project: WildFly Elytron
>          Issue Type: Bug
>    Affects Versions: 1.1.0.Beta7
>            Reporter: Ondrej Lukas
>            Assignee: David Lloyd
>              Labels: static_analysis
>             Fix For: 1.1.0.Beta8
>
>
> There is missing or unnecessary null check in {{getSaltedPasswordFromTwoWay}} method of org.wildfly.security.sasl.digest.AbstractDigestMechanism. {{char[] passwordChars}} is assigned on line 650 [1]. 
> * In case when null can be assigned to {{passwordChars}} then there is missing null check before calling {{userRealmPasswordDigest(messageDigest, username, realm, passwordChars);}} on line 658 which can result to NPE. 
> * In case when null cannot be assigned to {{passwordChars}} then there is unnecessary null check on line 659.
> [1] https://github.com/wildfly-security/wildfly-elytron/blob/e01a09572b02f33db01695eb85638e88b0cd944f/src/main/java/org/wildfly/security/sasl/digest/AbstractDigestMechanism.java#L650



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list