Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverity - Dereference null return value - ClientConnectionManagerImpl.InitConnectionTask.run() #11771

Closed
kwart opened this issue Nov 10, 2017 · 1 comment

Comments

@kwart
Copy link
Contributor

@kwart kwart commented Nov 10, 2017

The addressTranslator.translate(target) in com.hazelcast.client.connection.nio.ClientConnectionManagerImpl.InitConnectionTask.run() may return null. The returned value is used as an argument for createSocketConnection(Address) which uses the value without a null-check.

https://scan4.coverity.com/reports.htm#v32322/p13030/fileInstanceId=29225738&defectInstanceId=5757171&mergedDefectId=202185

@sancar
Copy link
Member

@sancar sancar commented Nov 10, 2017

This is not a bug that in the sense that we are catching and handling the NullPointerException.
We may add a specific check to increase readability tough.

@sancar sancar added this to the 3.9.1 milestone Nov 10, 2017
@tombujok tombujok modified the milestones: 3.9.1, 3.9.2 Nov 20, 2017
sancar added a commit to sancar/hazelcast that referenced this issue Nov 23, 2017
Result of address translator is checked against null to add
descriptive message to NPE.

fixes hazelcast#11771
sancar added a commit to sancar/hazelcast that referenced this issue Nov 23, 2017
Result of address translator is checked against null to add
descriptive message to NPE.

fixes hazelcast#11771
@sancar sancar self-assigned this Nov 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

4 participants
You can’t perform that action at this time.