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: improves stability on get_available_memory #1728

Merged
merged 4 commits into from
Oct 2, 2024

Conversation

RuffaloLavoisier
Copy link
Contributor

@RuffaloLavoisier RuffaloLavoisier commented Sep 23, 2024

What:

  1. Added safety to check if it is null before using the file pointer.
  2. Check buf null pointer, change fread() condition check.

Why:

  1. File pointer may be null due to environmental factors.
  2. If the fread fails, the buffer may be NULL.

How:

  1. Add check condition for file pointer.
  2. Add check condition for buf

Checklist:

  • Tests
  • PR merge commit message adjusted

@RuffaloLavoisier RuffaloLavoisier requested a review from a team as a code owner September 23, 2024 11:23
@RuffaloLavoisier RuffaloLavoisier changed the title Fix: check when the file could not be opened Fix: improves stability on get_available_memory Sep 23, 2024
src/pluginlaunch.c Outdated Show resolved Hide resolved
@jjnicola
Copy link
Member

Hi @RuffaloLavoisier ! thanks for your collaboration. Please, take a look at https://github.com/greenbone/openvas-scanner/tree/main/RELICENSE

@RuffaloLavoisier
Copy link
Contributor Author

@jjnicola

Hi there
When will it be merged into the main branch?

@nichtsfrei nichtsfrei merged commit 3b5707b into greenbone:main Oct 2, 2024
14 of 19 checks passed
@RuffaloLavoisier RuffaloLavoisier deleted the checkOpen branch October 3, 2024 15:37
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.

3 participants