public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1193] xtensa: Fix buffer overflow
@ 2022-06-22  0:52 Max Filippov
  0 siblings, 0 replies; only message in thread
From: Max Filippov @ 2022-06-22  0:52 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ec532b47f1823e71f822c0da781c531ffff67a52

commit r13-1193-gec532b47f1823e71f822c0da781c531ffff67a52
Author: Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Date:   Wed Jun 22 04:51:32 2022 +0900

    xtensa: Fix buffer overflow
    
    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().

Diff:
---
 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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-22  0:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22  0:52 [gcc r13-1193] xtensa: Fix buffer overflow Max Filippov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).