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 crash in malloc #6583

Merged
merged 4 commits into from
Aug 1, 2019
Merged

Conversation

thiagoftsm
Copy link
Contributor

Summary

The netdata has a random error to allocate memory in some requests according with outputs we were receiving from our demo server.

After to check the valgrind output, it was possible to verify that the malloc error could happen steps before due a set of values in an address NULL. This pull request fixes this checking the existence of a valid address before to set the value.

Component Name

web/ url parser

Additional Information

It fixes #6582

The system was setting NULL in an address without to have the values
After to fix the SSL, the script were not 100% compatible, so I am bringing the solution here
Fixes reported in the issue related a possible NULL value to be kept and wrong variable
It was a missing if yet, so I changed it, no less important I inverted the check order inside if to be more readable
@paulkatsoulakis paulkatsoulakis merged commit 2db6d75 into netdata:master Aug 1, 2019
jacekkolasa pushed a commit to jacekkolasa/netdata that referenced this pull request Aug 6, 2019
* Server Crashing: URL search path

The system was setting NULL in an address without to have the values

* Server Crashing: URL script

After to fix the SSL, the script were not 100% compatible, so I am bringing the solution here

* Server Crashing:

Fixes reported in the issue related a possible NULL value to be kept and wrong variable

* Server Crashing: Readable code and missing if

It was a missing if yet, so I changed it, no less important I inverted the check order inside if to be more readable
jacekkolasa pushed a commit to jacekkolasa/netdata that referenced this pull request Aug 6, 2019
* Server Crashing: URL search path

The system was setting NULL in an address without to have the values

* Server Crashing: URL script

After to fix the SSL, the script were not 100% compatible, so I am bringing the solution here

* Server Crashing:

Fixes reported in the issue related a possible NULL value to be kept and wrong variable

* Server Crashing: Readable code and missing if

It was a missing if yet, so I changed it, no less important I inverted the check order inside if to be more readable
@thiagoftsm thiagoftsm deleted the server_crashing branch November 13, 2019 12:06
jackyhuang85 pushed a commit to jackyhuang85/netdata that referenced this pull request Jan 1, 2020
* Server Crashing: URL search path

The system was setting NULL in an address without to have the values

* Server Crashing: URL script

After to fix the SSL, the script were not 100% compatible, so I am bringing the solution here

* Server Crashing:

Fixes reported in the issue related a possible NULL value to be kept and wrong variable

* Server Crashing: Readable code and missing if

It was a missing if yet, so I changed it, no less important I inverted the check order inside if to be more readable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

netdata crashing in malloc()
4 participants