Martin Choma created ELY-1048:
---------------------------------
Summary: Coverity, ignoring number of bytes read
Key: ELY-1048
URL:
https://issues.jboss.org/browse/ELY-1048
Project: WildFly Elytron
Issue Type: Bug
Reporter: Martin Choma
Assignee: Darran Lofthouse
Coverity found error handling of reading stream is not sufficient. There is no check if
number of actual read bytes match number of expected read bytes .
{code:java|title=KeyStoreCredentialStore.java}
private byte[] readBytes(ObjectInputStream ois) throws IOException {
int len = ois.readInt();
byte[] data = new byte[len];
ois.read(data, 0, len);
return data;
}
{code}
[1]
https://scan7.coverity.com/reports.htm#v23632/p11778/fileInstanceId=12563...
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)