https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119671

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jonathan Wakely
<r...@gcc.gnu.org>:

https://gcc.gnu.org/g:6c61f43b8cd410125026429a6ea87308dd49a786

commit r13-9500-g6c61f43b8cd410125026429a6ea87308dd49a786
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Mon Apr 7 19:52:55 2025 +0100

    libstdc++: Fix use-after-free in std::format [PR119671]

    When formatting floating-point values to wide strings there's a case
    where we invalidate a std::wstring buffer while a std::wstring_view is
    still referring to it.

    libstdc++-v3/ChangeLog:

            PR libstdc++/119671
            * include/std/format (__formatter_fp::format): Do not invalidate
            __wstr unless _M_localized returns a valid string.
            * testsuite/std/format/functions/format.cc: Check wide string
            formatting of floating-point types with classic locale.

    Reviewed-by: Tomasz Kaminski <tkami...@redhat.com>
    (cherry picked from commit e33b62eed7fd0a82d758b23252d288585b6790d2)

Reply via email to