Skip to content

Commit

Permalink
Do not store in memory an empty file received as nvt preference.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnicola committed Oct 17, 2019
1 parent 71259c8 commit 6ec858c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [7.0.1] (unreleased)

### Fixed
- Do not store in memory an empty file received as nvt preference. [#408](https://github.com/greenbone/openvas/pull/408)

[7.0.1]: https://github.com/greenbone/openvas/compare/v7.0.0...openvas-7.0

## [7.0.0] (2019-10-11)

### Added
Expand Down
4 changes: 2 additions & 2 deletions src/openvas.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ load_scan_preferences (struct scan_globals *globals)
if (pref[0])
{
gchar **pref_name = g_strsplit (pref[0], ":", 3);
if (pref_name[1] && pref_name[2]
&& !strncmp (pref_name[2], "file", 4))
if (pref_name[1] && pref_name[2] && !strncmp (pref_name[2], "file", 4)
&& strcmp (pref[1], ""))
{
char *file_hash = gvm_uuid_make ();
int ret;
Expand Down

0 comments on commit 6ec858c

Please sign in to comment.