aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMatthew Fortune <matthew.fortune@imgtec.com>2017-04-20 13:27:05 +0000
committerMatthew Fortune <mpf@gcc.gnu.org>2017-04-20 13:27:05 +0000
commit798d7f42dc0c713abcf6b58ed9f1ff4e36391442 (patch)
treebd92c04bcba3ededec979be27e466c102ad8ff71 /gcc
parent1b36f6036e5be4dd9110b2fa9bebdd9db48e6ae1 (diff)
downloadgcc-798d7f42dc0c713abcf6b58ed9f1ff4e36391442.zip
gcc-798d7f42dc0c713abcf6b58ed9f1ff4e36391442.tar.gz
gcc-798d7f42dc0c713abcf6b58ed9f1ff4e36391442.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/mips/mips.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c908048..80d3436 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-04-20 Matthew Fortune <matthew.fortune@imgtec.com>
+
+ * config/mips/mips.c (mips_expand_vec_perm_const): Re-fix
+ uninitialized variable warning to avoid buffer overrun.
+
2017-04-20 Alexander Monakov <amonakov@ispras.ru>
PR other/71250
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index b35fba7..6bfd86a 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);