public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jiu Fu Guo <guojiufu@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/guojiufu/heads/personal-branch)] PR fortran/95091 - Buffer overflows with submodules and long symbols Date: Wed, 10 Jun 2020 03:43:52 +0000 (GMT) [thread overview] Message-ID: <20200610034352.1C2E9396EC99@sourceware.org> (raw) https://gcc.gnu.org/g:5aaccde3db39fac7e7f6677ceccc1eadd9c6a424 commit 5aaccde3db39fac7e7f6677ceccc1eadd9c6a424 Author: Harald Anlauf <anlauf@gmx.de> Date: Sun Jun 7 16:43:12 2020 +0200 PR fortran/95091 - Buffer overflows with submodules and long symbols Add cast to fix bootstrap error with -Werror=sign-compare. gcc/fortran/ PR fortran/95091 * class.c (gfc_hash_value): Add cast. Diff: --- gcc/fortran/class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c index 8bb73502f5d..2b55859ce75 100644 --- a/gcc/fortran/class.c +++ b/gcc/fortran/class.c @@ -540,7 +540,7 @@ gfc_hash_value (gfc_symbol *sym) get_unique_type_string (&c[0], sym); len = strnlen (c, sizeof (c)); - gcc_assert (len < sizeof (c)); + gcc_assert ((size_t) len < sizeof (c)); for (i = 0; i < len; i++) hash = (hash << 6) + (hash << 16) - hash + c[i];
next reply other threads:[~2020-06-10 3:43 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-10 3:43 Jiu Fu Guo [this message] -- strict thread matches above, loose matches on Subject: below -- 2020-06-10 3:43 Jiu Fu Guo
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=20200610034352.1C2E9396EC99@sourceware.org \ --to=guojiufu@gcc.gnu.org \ --cc=gcc-cvs@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).