[jboss-jira] [JBoss JIRA] (ELY-1051) Coverity, derefere null return value in KeyStoreCredentialStore.store
Ilia Vassilev (JIRA)
issues at jboss.org
Mon Apr 3 08:05:01 EDT 2017
[ https://issues.jboss.org/browse/ELY-1051?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ilia Vassilev reassigned ELY-1051:
----------------------------------
Assignee: Ilia Vassilev (was: Darran Lofthouse)
> Coverity, derefere null return value in KeyStoreCredentialStore.store
> ---------------------------------------------------------------------
>
> Key: ELY-1051
> URL: https://issues.jboss.org/browse/ELY-1051
> Project: WildFly Elytron
> Issue Type: Bug
> Reporter: Martin Choma
> Assignee: Ilia Vassilev
> Priority: Critical
>
> Coverity found possible null dereference as {{getEntry()}} could return null.
> https://scan7.coverity.com/reports.htm#v23632/p11778/fileInstanceId=12563831&defectInstanceId=2991455&mergedDefectId=1422740
> {code:java|title=KeyStoreCredentialStore.java}
> void store(OutputStream outputStream) throws IOException, GeneralSecurityException {
> ObjectOutputStream oos = new ObjectOutputStream(outputStream);
> oos.writeInt(VERSION);
> Enumeration<String> ksAliases = dataKeyStore.aliases();
> while(ksAliases.hasMoreElements()) {
> String alias = ksAliases.nextElement();
> KeyStore.Entry entry = dataKeyStore.getEntry(alias, convertParameter(protectionParameter));
> if (entry instanceof KeyStore.SecretKeyEntry) {
> saveSecretKey(alias, oos, (KeyStore.SecretKeyEntry)entry);
> } else {
> throw log.unrecognizedEntryType(entry.getClass().getCanonicalName());
> }
> }
> oos.flush();
> oos.close();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the jboss-jira
mailing list