8340923: The class LogSelection copies uninitialized memory

Reviewed-by: mbaesken, jwaters, stefank
This commit is contained in:
Johan Sjölen 2024-09-26 08:47:32 +00:00
parent 8c8f0d85ce
commit 10da2c21a1

View File

@ -33,11 +33,11 @@
const LogSelection LogSelection::Invalid;
LogSelection::LogSelection() : _ntags(0), _wildcard(false), _level(LogLevel::Invalid), _tag_sets_selected(0) {
LogSelection::LogSelection() : _ntags(0), _tags(), _wildcard(false), _level(LogLevel::Invalid), _tag_sets_selected(0) {
}
LogSelection::LogSelection(const LogTagType tags[LogTag::MaxTags], bool wildcard, LogLevelType level)
: _ntags(0), _wildcard(wildcard), _level(level), _tag_sets_selected(0) {
: _ntags(0), _tags(), _wildcard(wildcard), _level(level), _tag_sets_selected(0) {
while (_ntags < LogTag::MaxTags && tags[_ntags] != LogTag::__NO_TAG) {
_tags[_ntags] = tags[_ntags];
_ntags++;