[TESTSUITE]Use memcpy instead of strcpy in testsuite/gcc.dg/memcmp-1.c
authorRenlin Li <renlin.li@arm.com>
Thu, 31 Aug 2017 09:18:22 +0000 (09:18 +0000)
committerRenlin Li <renlin@gcc.gnu.org>
Thu, 31 Aug 2017 09:18:22 +0000 (09:18 +0000)
commit3aebc597181a97c7b064f04d8e8aa30f79c51451
treef1790f4ad47d5bc63465c9f6e40b64f401dcccc2
parent4b0d36db3c835ce9e3080f5203bd8ea7cdf43b5c
[TESTSUITE]Use memcpy instead of strcpy in testsuite/gcc.dg/memcmp-1.c

strcpy will keep reading and writing memory if the string is not terminated
with null character. In this case, it may visit memory beyond the boundary.

gcc/testsuite/

2017-08-31  Renlin Li  <renlin.li@arm.com>
    Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>

* gcc.dg/memcmp-1.c (test_strncmp): Use memcpy instead of strcpy.

Co-Authored-By: Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
From-SVN: r251554
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/memcmp-1.c