[Bug libstdc++/78236] regex_iterator constructor is incomplete and creates uninitialized values that may be used
timshen at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 8 07:03:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78236
Tim Shen <timshen at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |timshen at gcc dot gnu.org
--- Comment #2 from Tim Shen <timshen at gcc dot gnu.org> ---
(In reply to Christophe Monat from comment #1)
> Comment on attachment 39982 [details]
> 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()
> > { }
> >
> > /**
I proposed another way to fix this in the list:
https://gcc.gnu.org/ml/libstdc++/2016-11/msg00008.html
More information about the Gcc-bugs
mailing list