From: Matthew Fortune Date: Thu, 20 Apr 2017 13:27:05 +0000 (+0000) Subject: MIPS: Prevent buffer overrun in uninitialised variable fix X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=798d7f42dc0c713abcf6b58ed9f1ff4e36391442;p=gcc.git MIPS: Prevent buffer overrun in uninitialised variable fix gcc/ * config/mips/mips.c (mips_expand_vec_perm_const): Re-fix uninitialized variable warning to avoid buffer overrun. From-SVN: r247022 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c908048f21b..80d343615b2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-04-20 Matthew Fortune + + * config/mips/mips.c (mips_expand_vec_perm_const): Re-fix + uninitialized variable warning to avoid buffer overrun. + 2017-04-20 Alexander Monakov PR other/71250 diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index b35fba7e2ad..6bfd86a07af 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -21358,7 +21358,7 @@ mips_expand_vec_perm_const (rtx operands[4]) /* This is overly conservative, but ensures we don't get an uninitialized warning on ORIG_PERM. */ - memset (&orig_perm[nelt], 0, MAX_VECT_LEN); + memset (orig_perm, 0, MAX_VECT_LEN); for (i = which = 0; i < nelt; ++i) { rtx e = XVECEXP (sel, 0, i);