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 memory leak & uninitialized var #126

Merged
merged 2 commits into from
Aug 24, 2016

Conversation

bryonglodencissp
Copy link
Contributor

On line no. 53 of 'themis_seccure_message.c' the variable 'themis_status_t' is uninitialized. It's always good to initialize variables, because if you try to retrieve a value before it gets assigned any actual (non-garbage) value, then it results in undefined behavior.

On line no. 105 of 'themis_seccure_message.c' there is a memory leak, which is a non-security bug.

Found by https://github.com/bryongloden/cppcheck

Bryon Gloden, CISSP® added 2 commits August 22, 2016 19:07
[themis/tests/themis/themis_seccure_message.c:53]: (error) Uninitialized variable: res
[tests/themis/themis_seccure_message.c:105]: (error) Memory leak: unwrapped_message
@ignatk ignatk merged commit edcf1d9 into cossacklabs:master Aug 24, 2016
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.

2 participants