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

Fix segfaults in case of out-of-memory situations #1679

Merged
merged 2 commits into from Oct 18, 2019
Merged

Conversation

yonarw
Copy link
Contributor

@yonarw yonarw commented Oct 17, 2019

This fixes #1678

src/ell_set.cpp Outdated
new_params->next = pj_mkparam (ellps->ell);
if (nullptr == new_params)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cppcheck complains:

/home/travis/build/OSGeo/PROJ/src/ell_set.cpp:163,warning,nullPointer,Possible null pointer dereference: new_params - otherwise it is redundant to check it against null.

Indeed the check should be against new_params->next

@rouault rouault merged commit 00666ee into OSGeo:master Oct 18, 2019
@kbevers kbevers added this to the 6.2.1 milestone Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

potential segfault in out of memory situations
3 participants