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 segfault due to NULL save_config_nvt_omp response #1044

Merged

Conversation

timopollmeier
Copy link
Member

This addresses a segfault that could occur if the last preference on an NVT preferences edit dialog is skipped, e.g. when it's a password that's not overwritten, or possibly if no preferences are sent at all.

The first commit is about preventing the segfault in case a NULL response is passed to send_response, while the second one prevents save_config_nvt_omp from returning a NULL response under the conditions above.

If the response string given to send_response is NULL, log a warning and
send an empty response with HTTP code 500.
Now a generic success message is returned if no errors occur to ensure
there is a valid response.
Previously the returned message could be NULL if it was not set by
check_modify_config because there are no preferences given or the last
preference was skipped (e.g. if it's a password where the "Replace
existing ..." box was not checked).
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.

None yet

2 participants