public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/103664] std::regex_replace bug if the string contains \0 Date: Sun, 12 Dec 2021 12:26:24 +0000 [thread overview] Message-ID: <bug-103664-4-VC3io7SSaK@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-103664-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103664 Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2021-12-12 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- The problem is that the overload of regex_replace taking a basic_string is implemented in terms of the one taking a null-terminated string: regex_replace(_Out_iter __out, _Bi_iter __first, _Bi_iter __last, const basic_regex<_Ch_type, _Rx_traits>& __e, const basic_string<_Ch_type, _St, _Sa>& __fmt, regex_constants::match_flag_type __flags = regex_constants::match_default) { return regex_replace(__out, __first, __last, __e, __fmt.c_str(), __flags); }
next prev parent reply other threads:[~2021-12-12 12:26 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-11 21:52 [Bug libstdc++/103664] New: " artur77 at freemail dot hu 2021-12-12 2:39 ` [Bug libstdc++/103664] " pinskia at gcc dot gnu.org 2021-12-12 12:26 ` redi at gcc dot gnu.org [this message] 2021-12-12 12:34 ` redi at gcc dot gnu.org 2021-12-13 11:16 ` cvs-commit at gcc dot gnu.org 2021-12-13 11:50 ` redi at gcc dot gnu.org 2022-07-07 23:32 ` cvs-commit at gcc dot gnu.org 2023-06-09 9:47 ` redi at gcc dot gnu.org 2023-06-23 16:12 ` cvs-commit at gcc dot gnu.org 2023-06-23 16:18 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-103664-4-VC3io7SSaK@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).