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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Apr 10 07:27:20 2019
New Revision: 270246

URL: https://gcc.gnu.org/viewcvs?rev=270246&root=gcc&view=rev
Log:
        PR c++/90010
        * gimple-ssa-sprintf.c (target_to_host): Fix handling of targstr
        with strlen in between hostsz-3 and hostsz-1 inclusive when no
        translation is needed, and when translation is needed, only append
        ... if the string length is hostsz or more bytes long.  Avoid using
        strncpy or strcat.

        * gcc.dg/pr90010.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr90010.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimple-ssa-sprintf.c
    trunk/gcc/testsuite/ChangeLog

Reply via email to