Skip to content

Commit 2c4d25a

Browse files
tempozvprus
authored andcommitted
Value-initialize m_desc
Value-initialize m_desc (to NULL) in this constructor to avoid uninitialized memory situations. This issue is related to Coverity CID12523 and was uncovered by Coverity.
1 parent bae4080 commit 2c4d25a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/boost/program_options/detail/parsers.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ namespace boost { namespace program_options {
4040
: detail::cmdline(
4141
// Explicit template arguments are required by gcc 3.3.1
4242
// (at least mingw version), and do no harm on other compilers.
43-
to_internal(detail::make_vector<charT, const charT* const*>(argv+1, argv+argc+!argc)))
43+
to_internal(detail::make_vector<charT, const charT* const*>(argv+1, argv+argc+!argc))),
44+
m_desc()
4445
{}
4546

4647

0 commit comments

Comments
 (0)