[Bug libstdc++/78236] regex_iterator constructor is incomplete and creates uninitialized values that may be used
christophe.monat at st dot com
gcc-bugzilla@gcc.gnu.org
Mon Nov 7 16:02:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78236
--- Comment #1 from Christophe Monat <christophe.monat at st dot com> ---
Comment on attachment 39982
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39982
Proposed patch to fix the regex_iterator constructor
>diff --git a/libstdc++-v3/include/bits/regex.h b/libstdc++-v3/include/bits/regex.h
>index a7d45e6..bb0a167 100644
>--- a/libstdc++-v3/include/bits/regex.h
>+++ b/libstdc++-v3/include/bits/regex.h
>@@ -2454,7 +2454,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
> * one-past-the-end of a range.
> */
> regex_iterator()
>- : _M_match()
>+ : _M_pregex(), _M_flags(regex_constants::match_default), _M_match()
> { }
>
> /**
More information about the Gcc-bugs
mailing list