From abf57b082b89a70bacdc1241f805c26fbd0cbe79 Mon Sep 17 00:00:00 2001 From: Zoey Greer Date: Tue, 11 Nov 2014 13:57:37 -0500 Subject: [PATCH] Initialize m_position, m_end, and m_flags The constructor for basic_regex_formatter left m_position, m_end, and m_flags uninitialized, as uncovered by Coverity CID12310. We now value-initialize them in the initializer list. --- include/boost/regex/v4/regex_format.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/regex/v4/regex_format.hpp b/include/boost/regex/v4/regex_format.hpp index 80c654e4..a34c40ad 100644 --- a/include/boost/regex/v4/regex_format.hpp +++ b/include/boost/regex/v4/regex_format.hpp @@ -96,7 +96,7 @@ class basic_regex_formatter public: typedef typename traits::char_type char_type; basic_regex_formatter(OutputIterator o, const Results& r, const traits& t) - : m_traits(t), m_results(r), m_out(o), m_state(output_copy), m_restore_state(output_copy), m_have_conditional(false) {} + : m_traits(t), m_results(r), m_out(o), m_position(), m_end(), m_flags(), m_state(output_copy), m_restore_state(output_copy), m_have_conditional(false) {} OutputIterator format(ForwardIter p1, ForwardIter p2, match_flag_type f); OutputIterator format(ForwardIter p1, match_flag_type f) {