]
Ilia Vassilev reassigned ELY-740:
---------------------------------
Assignee: Ilia Vassilev (was: Darran Lofthouse)
Coverity static analysis: Dereference null return value in EntityUtil
(Elytron)
-------------------------------------------------------------------------------
Key: ELY-740
URL:
https://issues.jboss.org/browse/ELY-740
Project: WildFly Elytron
Issue Type: Bug
Reporter: Josef Cacek
Assignee: Ilia Vassilev
Labels: static_analysis
Coverity static-analysis scan found possible call on null object in
{{EntityUtil.encodeAlgorithmIdentifier}} method:
https://scan7.coverity.com/reports.htm#v16159/p11778/fileInstanceId=57603...
In the call
{{encodeAlgorithmIdentifier(encoder, algorithmOid(algorithm), omitParametersField);}}
the {{algorithmOid()}} may return null (look at {{Entity}} class).
Then the {{encodeAlgorithmIdentifier}} calls {{DerEncoder.encodeObjectIdentifier}} where
on the given String is called {{length()}} method without a null check.