The following issues were found
src/third_party/boost/boost/dynamic_bitset/dynamic_bitset.hpp
7 issues
Line: 1707
Column: 12
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
} // if opfx
if(err != ok)
os.setstate(err); // assume this does NOT throw
return os;
}
#else
Reported by FlawFinder.
Line: 1780
Column: 28
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
} BOOST_CATCH (...) { // see std 27.6.1.1/4
bool rethrow = false;
BOOST_TRY { os.setstate(ios_base::failbit); } BOOST_CATCH (...) { rethrow = true; } BOOST_CATCH_END
if (rethrow)
BOOST_RETHROW;
}
BOOST_CATCH_END
Reported by FlawFinder.
Line: 1789
Column: 12
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
}
if(err != ok)
os.setstate(err); // may throw exception
return os;
}
#endif
Reported by FlawFinder.
Line: 1848
Column: 24
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
appender.do_append(char(c) == '1');
}
BOOST_CATCH(...) {
is.setstate(std::ios::failbit); // assume this can't throw
BOOST_RETHROW;
}
BOOST_CATCH_END
}
Reported by FlawFinder.
Line: 1861
Column: 12
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
if (b.size() == 0)
err |= std::ios::failbit;
if (err != std::ios::goodbit)
is.setstate (err); // may throw
return is;
}
#else // BOOST_OLD_IOSTREAMS
Reported by FlawFinder.
Line: 1923
Column: 28
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
// append to the underlying vector (out of memory)
bool rethrow = false; // see std 27.6.1.1/4
BOOST_TRY { is.setstate(ios_base::badbit); }
BOOST_CATCH(...) { rethrow = true; }
BOOST_CATCH_END
if (rethrow)
BOOST_RETHROW;
Reported by FlawFinder.
Line: 1938
Column: 12
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
if (b.size() == 0 /*|| !cerberos*/)
err |= ios_base::failbit;
if (err != ios_base::goodbit)
is.setstate (err); // may throw
return is;
}
Reported by FlawFinder.
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/MSCommon/arch.py
7 issues
Line: 29
Column: 1
__doc__ = """Module to define supported Windows chip architectures.
"""
import os
class ArchDefinition(object):
"""
A class for defining architecture-specific settings and logic.
"""
Reported by Pylint.
Line: 35
Column: 5
"""
A class for defining architecture-specific settings and logic.
"""
def __init__(self, arch, synonyms=[]):
self.arch = arch
self.synonyms = synonyms
SupportedArchitectureList = [
ArchDefinition(
Reported by Pylint.
Line: 24
Column: 1
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
__doc__ = """Module to define supported Windows chip architectures.
"""
import os
Reported by Pylint.
Line: 31
Column: 1
import os
class ArchDefinition(object):
"""
A class for defining architecture-specific settings and logic.
"""
def __init__(self, arch, synonyms=[]):
self.arch = arch
Reported by Pylint.
Line: 31
Column: 1
import os
class ArchDefinition(object):
"""
A class for defining architecture-specific settings and logic.
"""
def __init__(self, arch, synonyms=[]):
self.arch = arch
Reported by Pylint.
Line: 54
Column: 1
'ia64',
['IA64'],
),
ArchDefinition(
'arm',
['ARM'],
),
Reported by Pylint.
Line: 67
Column: 1
SupportedArchitectureMap[a.arch] = a
for s in a.synonyms:
SupportedArchitectureMap[s] = a
Reported by Pylint.
src/third_party/wiredtiger/test/suite/test_cursor16.py
7 issues
Line: 34
Column: 1
#
import wttest
from wiredtiger import stat
class test_cursor16(wttest.WiredTigerTestCase):
tablename = 'test_cursor16'
uri_prefix = 'table:' + tablename
uri_count = 100
Reported by Pylint.
Line: 1
Column: 1
#!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
Reported by Pylint.
Line: 34
Column: 1
#
import wttest
from wiredtiger import stat
class test_cursor16(wttest.WiredTigerTestCase):
tablename = 'test_cursor16'
uri_prefix = 'table:' + tablename
uri_count = 100
Reported by Pylint.
Line: 36
Column: 1
import wttest
from wiredtiger import stat
class test_cursor16(wttest.WiredTigerTestCase):
tablename = 'test_cursor16'
uri_prefix = 'table:' + tablename
uri_count = 100
session_count = 100
Reported by Pylint.
Line: 36
Column: 1
import wttest
from wiredtiger import stat
class test_cursor16(wttest.WiredTigerTestCase):
tablename = 'test_cursor16'
uri_prefix = 'table:' + tablename
uri_count = 100
session_count = 100
Reported by Pylint.
Line: 45
Column: 5
conn_config = 'cache_cursors=true,statistics=(fast),in_memory=true'
# Returns the number of cursors cached
def cached_stats(self):
stat_cursor = self.session.open_cursor('statistics:', None, None)
cache = stat_cursor[stat.conn.cursor_cached_count][2]
stat_cursor.close()
return cache
Reported by Pylint.
Line: 51
Column: 5
stat_cursor.close()
return cache
def test_cursor16(self):
uris = []
cursors = []
#self.tty('begin cursors cached=' + str(self.cached_stats()))
for i in range(0, self.uri_count):
uri = self.uri_prefix + '-' + str(i)
Reported by Pylint.
src/third_party/wiredtiger/test/3rdparty/python-subunit-0.0.16/python/subunit/tests/test_filters.py
7 issues
Line: 20
Column: 1
import sys
from tempfile import NamedTemporaryFile
from testtools import TestCase
from subunit.filters import find_stream
class TestFindStream(TestCase):
Reported by Pylint.
Line: 17
Column: 1
# limitations under that license.
#
import sys
from tempfile import NamedTemporaryFile
from testtools import TestCase
from subunit.filters import find_stream
Reported by Pylint.
Line: 1
Column: 1
#
# subunit: extensions to Python unittest to get test results from subprocesses.
# Copyright (C) 2013 Robert Collins <robertc@robertcollins.net>
#
# Licensed under either the Apache License, Version 2.0 or the BSD 3-clause
# license at the users choice. A copy of both licenses are available in the
# project source as Apache-2.0 and BSD. You may not use this file except in
# compliance with one of these two licences.
#
Reported by Pylint.
Line: 25
Column: 1
from subunit.filters import find_stream
class TestFindStream(TestCase):
def test_no_argv(self):
self.assertEqual('foo', find_stream('foo', []))
def test_opens_file(self):
Reported by Pylint.
Line: 27
Column: 5
class TestFindStream(TestCase):
def test_no_argv(self):
self.assertEqual('foo', find_stream('foo', []))
def test_opens_file(self):
f = NamedTemporaryFile()
f.write(b'foo')
Reported by Pylint.
Line: 30
Column: 5
def test_no_argv(self):
self.assertEqual('foo', find_stream('foo', []))
def test_opens_file(self):
f = NamedTemporaryFile()
f.write(b'foo')
f.flush()
stream = find_stream('bar', [f.name])
self.assertEqual(b'foo', stream.read())
Reported by Pylint.
Line: 31
Column: 9
self.assertEqual('foo', find_stream('foo', []))
def test_opens_file(self):
f = NamedTemporaryFile()
f.write(b'foo')
f.flush()
stream = find_stream('bar', [f.name])
self.assertEqual(b'foo', stream.read())
Reported by Pylint.
src/mongo/base/data_type_terminated_test.cpp
7 issues
Line: 120
ASSERT_EQUALS(expected, buf.substr(0, buf.size() - avail));
}
TEST(DataTypeTerminated, StringDataNormalLoad) {
const StringData writes[] = {StringData("a"), StringData("bb"), StringData("ccc")};
std::string buf;
for (const auto& w : writes) {
buf += w.toString();
buf += '\0';
Reported by Cppcheck.
Line: 154
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
TEST(DataTypeTerminated, StoreStatusOkAdvanced) {
// Test that an OK .store sets proper 'advanced'.
char buf[4] = {};
size_t advanced = 123; // should be overwritten
Status s = DataType::store(Terminated<'\0', Dummy<3>>(), buf, sizeof(buf), &advanced, 0);
ASSERT_OK(s);
ASSERT_EQ(StringData(buf, 4), StringData(std::string{'d', 'd', 'd', '\0'}));
ASSERT_EQUALS(advanced, 4u); // OK must overwrite advanced
Reported by FlawFinder.
Line: 187
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
TEST(DataTypeTerminated, StoreStatusPropagation) {
// Test that the nested type's .store complaints are surfaced.
char in[2]; // Not big enough to hold a Dummy<3>.
size_t advanced = 123;
Status s = DataType::store(Terminated<'\0', Dummy<3>>(), in, sizeof(in), &advanced, 0);
ASSERT_EQ(s.codeString(), "Overflow");
ASSERT_STRING_CONTAINS(s.reason(), "insufficient space for Dummy");
ASSERT_EQUALS(advanced, 123u); // fails must not overwrite advanced
Reported by FlawFinder.
Line: 210
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
}
TEST(DataTypeTerminated, ErrorShortWrite) {
char in[3] = {};
auto x = Terminated<'\0', Dummy<3>>();
size_t advanced = 123;
Status s = DataType::store(x, in, sizeof(in), &advanced, 0);
ASSERT_EQ(s.codeString(), "Overflow");
ASSERT_STRING_CONTAINS(s.reason(), "couldn't write");
Reported by FlawFinder.
Line: 221
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
}
TEST(DataTypeTerminated, ThroughDataRangeCursor) {
char buf[100];
const std::string parts[] = {"a", "bb", "ccc"};
std::string serialized;
for (const std::string& s : parts) {
serialized += s + '\0';
}
Reported by FlawFinder.
Line: 241
Column: 25
CWE codes:
120
20
for (const std::string& s : parts) {
Terminated<'\0', ConstDataRange> tcdr;
ASSERT_OK(buf_source.readAndAdvanceNoThrow(&tcdr));
std::string read(tcdr.value.data(), tcdr.value.data() + tcdr.value.length());
ASSERT_EQUALS(s, read);
}
}
}
Reported by FlawFinder.
Line: 242
Column: 30
CWE codes:
120
20
Terminated<'\0', ConstDataRange> tcdr;
ASSERT_OK(buf_source.readAndAdvanceNoThrow(&tcdr));
std::string read(tcdr.value.data(), tcdr.value.data() + tcdr.value.length());
ASSERT_EQUALS(s, read);
}
}
}
} // namespace
Reported by FlawFinder.
src/third_party/wiredtiger/src/utilities/util_load.c
7 issues
Line: 558
Column: 13
CWE codes:
134
Suggestion:
Use a constant for the format specification
/* Report on progress every 100 inserts. */
if (verbose && ++insert_count % 100 == 0) {
printf("\r\t%s: %" PRIu64, name, insert_count);
fflush(stdout);
}
}
if (verbose)
Reported by FlawFinder.
Line: 107
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
WT_CURSOR *cursor;
WT_DECL_RET;
int tret;
char **list, **tlist, *uri, config[64];
bool hex;
cursor = NULL;
list = NULL; /* -Wuninitialized */
hex = false; /* -Wuninitialized */
Reported by FlawFinder.
Line: 246
Column: 27
CWE codes:
126
if ((ret = util_read_line(session, &l, false, &eof)) != 0)
goto err;
s = "WiredTiger Dump ";
if (strncmp(l.mem, s, strlen(s)) != 0) {
ret = format(session);
goto err;
}
/* Header line #2: "Format={hex,print}". */
Reported by FlawFinder.
Line: 416
Column: 45
CWE codes:
126
*/
for (configp = cmdconfig; configp != NULL && *configp != NULL; configp += 2) {
for (found = 0, listp = list; *listp != NULL; listp += 2)
if (strncmp(*configp, listp[0], strlen(*configp)) == 0)
++found;
switch (found) {
case 0:
return (util_err(session, 0,
"the command line object name %s was not matched by any loaded object name",
Reported by FlawFinder.
Line: 454
Column: 45
CWE codes:
126
cnt = 0;
cfg[cnt++] = listp[1];
for (configp = cmdconfig; cmdconfig != NULL && *configp != NULL; configp += 2)
if (strncmp(*configp, listp[0], strlen(*configp)) == 0)
cfg[cnt++] = configp[1];
cfg[cnt++] = NULL;
if ((ret = __wt_config_merge((WT_SESSION_IMPL *)session, cfg,
"filename=,id=,checkpoint=,checkpoint_backup_info=,checkpoint_lsn=,version=,source="
Reported by FlawFinder.
Line: 483
Column: 27
CWE codes:
126
char *buf, *p;
/* Allocate room. */
len = strlen(*urip) + strlen(name) + 10;
if ((buf = malloc(len)) == NULL)
return (util_err(session, errno, NULL));
/*
* Find the separating colon characters, but note the trailing one may not be there.
Reported by FlawFinder.
Line: 483
Column: 11
CWE codes:
126
char *buf, *p;
/* Allocate room. */
len = strlen(*urip) + strlen(name) + 10;
if ((buf = malloc(len)) == NULL)
return (util_err(session, errno, NULL));
/*
* Find the separating colon characters, but note the trailing one may not be there.
Reported by FlawFinder.
src/third_party/abseil-cpp-master/abseil-cpp/absl/strings/str_cat.h
7 issues
Line: 327
Column: 41
CWE codes:
120
} // namespace strings_internal
ABSL_MUST_USE_RESULT inline std::string StrCat() { return std::string(); }
ABSL_MUST_USE_RESULT inline std::string StrCat(const AlphaNum& a) {
return std::string(a.data(), a.size());
}
Reported by FlawFinder.
Line: 329
Column: 41
CWE codes:
120
ABSL_MUST_USE_RESULT inline std::string StrCat() { return std::string(); }
ABSL_MUST_USE_RESULT inline std::string StrCat(const AlphaNum& a) {
return std::string(a.data(), a.size());
}
ABSL_MUST_USE_RESULT std::string StrCat(const AlphaNum& a, const AlphaNum& b);
ABSL_MUST_USE_RESULT std::string StrCat(const AlphaNum& a, const AlphaNum& b,
Reported by FlawFinder.
Line: 333
Column: 34
CWE codes:
120
return std::string(a.data(), a.size());
}
ABSL_MUST_USE_RESULT std::string StrCat(const AlphaNum& a, const AlphaNum& b);
ABSL_MUST_USE_RESULT std::string StrCat(const AlphaNum& a, const AlphaNum& b,
const AlphaNum& c);
ABSL_MUST_USE_RESULT std::string StrCat(const AlphaNum& a, const AlphaNum& b,
const AlphaNum& c, const AlphaNum& d);
Reported by FlawFinder.
Line: 334
Column: 34
CWE codes:
120
}
ABSL_MUST_USE_RESULT std::string StrCat(const AlphaNum& a, const AlphaNum& b);
ABSL_MUST_USE_RESULT std::string StrCat(const AlphaNum& a, const AlphaNum& b,
const AlphaNum& c);
ABSL_MUST_USE_RESULT std::string StrCat(const AlphaNum& a, const AlphaNum& b,
const AlphaNum& c, const AlphaNum& d);
// Support 5 or more arguments
Reported by FlawFinder.
Line: 336
Column: 34
CWE codes:
120
ABSL_MUST_USE_RESULT std::string StrCat(const AlphaNum& a, const AlphaNum& b);
ABSL_MUST_USE_RESULT std::string StrCat(const AlphaNum& a, const AlphaNum& b,
const AlphaNum& c);
ABSL_MUST_USE_RESULT std::string StrCat(const AlphaNum& a, const AlphaNum& b,
const AlphaNum& c, const AlphaNum& d);
// Support 5 or more arguments
template <typename... AV>
ABSL_MUST_USE_RESULT inline std::string StrCat(
Reported by FlawFinder.
Line: 341
Column: 41
CWE codes:
120
// Support 5 or more arguments
template <typename... AV>
ABSL_MUST_USE_RESULT inline std::string StrCat(
const AlphaNum& a, const AlphaNum& b, const AlphaNum& c, const AlphaNum& d,
const AlphaNum& e, const AV&... args) {
return strings_internal::CatPieces(
{a.Piece(), b.Piece(), c.Piece(), d.Piece(), e.Piece(),
static_cast<const AlphaNum&>(args).Piece()...});
Reported by FlawFinder.
Line: 287
Column: 3
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
private:
absl::string_view piece_;
char digits_[numbers_internal::kFastToBufferSize];
};
// -----------------------------------------------------------------------------
// StrCat()
// -----------------------------------------------------------------------------
Reported by FlawFinder.
src/third_party/wiredtiger/test/suite/test_truncate05.py
7 issues
Line: 29
Column: 1
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
import wiredtiger, wttest
# test_truncate05.py
# Test various fast truncate visibility scenarios
class test_truncate05(wttest.WiredTigerTestCase):
conn_config = 'cache_size=2MB'
Reported by Pylint.
Line: 1
Column: 1
#!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
Reported by Pylint.
Line: 29
Column: 1
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
import wiredtiger, wttest
# test_truncate05.py
# Test various fast truncate visibility scenarios
class test_truncate05(wttest.WiredTigerTestCase):
conn_config = 'cache_size=2MB'
Reported by Pylint.
Line: 33
Column: 1
# test_truncate05.py
# Test various fast truncate visibility scenarios
class test_truncate05(wttest.WiredTigerTestCase):
conn_config = 'cache_size=2MB'
session_config = 'isolation=snapshot'
def test_truncate_read_older_than_newest(self):
uri = 'table:test_truncate05'
Reported by Pylint.
Line: 33
Column: 1
# test_truncate05.py
# Test various fast truncate visibility scenarios
class test_truncate05(wttest.WiredTigerTestCase):
conn_config = 'cache_size=2MB'
session_config = 'isolation=snapshot'
def test_truncate_read_older_than_newest(self):
uri = 'table:test_truncate05'
Reported by Pylint.
Line: 37
Column: 5
conn_config = 'cache_size=2MB'
session_config = 'isolation=snapshot'
def test_truncate_read_older_than_newest(self):
uri = 'table:test_truncate05'
self.session.create(uri, 'key_format=i,value_format=S')
cursor = self.session.open_cursor(uri)
value1 = 'a' * 500
Reported by Pylint.
Line: 59
Column: 1
# Insert a single update at a later timestamp.
self.session.begin_transaction()
cursor[500] = value2
self.assertEqual(self.session.commit_transaction('commit_timestamp=' + self.timestamp_str(3)), 0)
# Insert a bunch of other content to fill the database and evict the committed update.
for i in range(1000, 20000):
self.session.begin_transaction()
cursor[i] = value1
Reported by Pylint.
site_scons/site_tools/split_dwarf.py
7 issues
Line: 23
Column: 1
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
import SCons
_splitDwarfFlag = "-gsplit-dwarf"
# Cribbed from Tool/cc.py and Tool/c++.py. It would be better if
# we could obtain this from SCons.
Reported by Pylint.
Line: 44
Column: 3
base, ext = SCons.Util.splitext(str(t))
if not any(ext == env[osuffix] for osuffix in ["OBJSUFFIX", "SHOBJSUFFIX"]):
continue
# TODO: Move 'dwo' into DWOSUFFIX so it can be customized? For
# now, GCC doesn't let you control the output filename, so it
# doesn't matter.
dwotarget = (t.builder.target_factory or env.File)(base + ".dwo")
new_targets.append(dwotarget)
targets = target + new_targets
Reported by Pylint.
Line: 1
Column: 1
# Copyright 2020 MongoDB Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
Reported by Pylint.
Line: 25
Column: 1
import SCons
_splitDwarfFlag = "-gsplit-dwarf"
# Cribbed from Tool/cc.py and Tool/c++.py. It would be better if
# we could obtain this from SCons.
_CSuffixes = [".c"]
if not SCons.Util.case_sensitive_suffixes(".c", ".C"):
Reported by Pylint.
Line: 40
Column: 9
def _dwo_emitter(target, source, env):
new_targets = []
for t in target:
base, ext = SCons.Util.splitext(str(t))
if not any(ext == env[osuffix] for osuffix in ["OBJSUFFIX", "SHOBJSUFFIX"]):
continue
# TODO: Move 'dwo' into DWOSUFFIX so it can be customized? For
# now, GCC doesn't let you control the output filename, so it
Reported by Pylint.
Line: 53
Column: 1
return (targets, source)
def generate(env):
suffixes = []
if _splitDwarfFlag in env["CCFLAGS"]:
suffixes = _CSuffixes + _CXXSuffixes
else:
if _splitDwarfFlag in env["CFLAGS"]:
Reported by Pylint.
Line: 72
Column: 1
emitterdict[suffix] = SCons.Builder.ListEmitter([base, _dwo_emitter,])
def exists(env):
return any(_splitDwarfFlag in env[f] for f in ["CCFLAGS", "CFLAGS", "CXXFLAGS"])
Reported by Pylint.
src/third_party/abseil-cpp-master/abseil-cpp/absl/flags/internal/usage.cc
7 issues
Line: 196
Column: 23
CWE codes:
120
FlagHelpPrettyPrinter printer(kHrfMaxLineLength, 4, 2, out);
// Flag name.
printer.Write(absl::StrCat("--", flag.Name()));
// Flag help.
printer.Write(absl::StrCat("(", flag.Help(), ");"), /*wrap_line=*/true);
// The listed default value will be the actual default from the flag
Reported by FlawFinder.
Line: 199
Column: 23
CWE codes:
120
printer.Write(absl::StrCat("--", flag.Name()));
// Flag help.
printer.Write(absl::StrCat("(", flag.Help(), ");"), /*wrap_line=*/true);
// The listed default value will be the actual default from the flag
// definition in the originating source file, unless the value has
// subsequently been modified using SetCommandLineOption() with mode
// SET_FLAGS_DEFAULT.
Reported by FlawFinder.
Line: 210
Column: 22
CWE codes:
120
bool is_modified = curr_val != dflt_val;
if (flag.IsOfType<std::string>()) {
dflt_val = absl::StrCat("\"", dflt_val, "\"");
}
printer.Write(absl::StrCat("default: ", dflt_val, ";"));
if (is_modified) {
if (flag.IsOfType<std::string>()) {
Reported by FlawFinder.
Line: 212
Column: 23
CWE codes:
120
if (flag.IsOfType<std::string>()) {
dflt_val = absl::StrCat("\"", dflt_val, "\"");
}
printer.Write(absl::StrCat("default: ", dflt_val, ";"));
if (is_modified) {
if (flag.IsOfType<std::string>()) {
curr_val = absl::StrCat("\"", curr_val, "\"");
}
Reported by FlawFinder.
Line: 216
Column: 24
CWE codes:
120
if (is_modified) {
if (flag.IsOfType<std::string>()) {
curr_val = absl::StrCat("\"", curr_val, "\"");
}
printer.Write(absl::StrCat("currently: ", curr_val, ";"));
}
printer.EndLine();
Reported by FlawFinder.
Line: 218
Column: 25
CWE codes:
120
if (flag.IsOfType<std::string>()) {
curr_val = absl::StrCat("\"", curr_val, "\"");
}
printer.Write(absl::StrCat("currently: ", curr_val, ";"));
}
printer.EndLine();
}
Reported by FlawFinder.
Line: 481
Column: 37
CWE codes:
120
if (name == "on") {
SetFlagsHelpMode(HelpMode::kMatch);
SetFlagsHelpMatchSubstr(absl::StrCat("/", value, "."));
return true;
}
if (name == "full") {
SetFlagsHelpMode(HelpMode::kFull);
Reported by FlawFinder.