[jboss-jira] [JBoss JIRA] (ELY-1051) Coverity, derefere null return value in KeyStoreCredentialStore.store
Martin Choma (JIRA)
issues at jboss.org
Mon Apr 3 04:29:00 EDT 2017
Martin Choma created ELY-1051:
---------------------------------
Summary: 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: Darran Lofthouse
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