Fortify buffer overflow message reported.
(see https://github.com/earlephilhower/esp-quick-toolchain/issues/36)

gcc/ChangeLog:

        * config/xtensa/xtensa.md (bswapsi2_internal):
        Enlarge the buffer that is obviously smaller than the template
        string given to sprintf().
---
 gcc/config/xtensa/xtensa.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md
index 84b975cf00e..f31ec33b362 100644
--- a/gcc/config/xtensa/xtensa.md
+++ b/gcc/config/xtensa/xtensa.md
@@ -536,7 +536,7 @@
 {
   rtx_insn *prev_insn = prev_nonnote_nondebug_insn (insn);
   const char *init = "ssai\t8\;";
-  static char result[64];
+  static char result[128];
   if (prev_insn && NONJUMP_INSN_P (prev_insn))
     {
       rtx x = PATTERN (prev_insn);
-- 
2.20.1
  • [PATCH] xtensa: Fix buffer ov... Takayuki 'January June' Suwa via Gcc-patches

Reply via email to