public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "anlauf at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/99688] AddressSanitizer: stack-buffer-overflow on address at gfc_match_name(char*) gcc/fortran/match.c:685 Date: Sat, 20 Mar 2021 20:41:11 +0000 [thread overview] Message-ID: <bug-99688-4-tcZ3dMK9bN@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-99688-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99688 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anlauf at gcc dot gnu.org --- Comment #1 from anlauf at gcc dot gnu.org --- I do not see the issue with valgrind, but does the following obvious patch help? diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index 4d5890fd523..9941887453f 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -6634,7 +6634,7 @@ gfc_match_select_rank (void) { gfc_expr *expr1, *expr2 = NULL; match m; - char name[GFC_MAX_SYMBOL_LEN]; + char name[GFC_MAX_SYMBOL_LEN + 1]; gfc_symbol *sym, *sym2; gfc_namespace *ns = gfc_current_ns; gfc_array_spec *as = NULL; There might be a similar issue with SELECT TYPE (gfc_match_select_type).
next prev parent reply other threads:[~2021-03-20 20:41 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-20 20:00 [Bug fortran/99688] New: " marxin at gcc dot gnu.org 2021-03-20 20:00 ` [Bug fortran/99688] " marxin at gcc dot gnu.org 2021-03-20 20:41 ` anlauf at gcc dot gnu.org [this message] 2021-03-21 16:09 ` burnus at gcc dot gnu.org 2021-03-22 8:51 ` cvs-commit at gcc dot gnu.org 2021-03-23 9:00 ` cvs-commit at gcc dot gnu.org 2021-03-24 8:15 ` cvs-commit at gcc dot gnu.org 2021-03-24 8:17 ` burnus at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-99688-4-tcZ3dMK9bN@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).