public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/65200] Handle EPERM when opening files
Date: Fri, 06 Mar 2015 13:17:00 -0000	[thread overview]
Message-ID: <bug-65200-4-DDqksS5hQY@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65200-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65200

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Janne Blomqvist from comment #3)
> +      char tmpmsg[256];
>        char *path = fc_strdup (opp->file, opp->file_len);
> -      size_t msglen = opp->file_len + 51;

> +      size_t msglen = opp->file_len + 22 + 256;

> +      snprintf (msg, msglen, "Cannot open file '%s': %s", path,
> +               gf_strerror (errno, tmpmsg, 256));

How about "sizeof (tmpmsg)" instead of 256?


  parent reply	other threads:[~2015-03-06 13:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25 10:28 [Bug libfortran/65200] New: " jb at gcc dot gnu.org
2015-02-25 21:17 ` [Bug libfortran/65200] " jvdelisle at gcc dot gnu.org
2015-02-25 21:31 ` jvdelisle at gcc dot gnu.org
2015-03-06 12:20 ` jb at gcc dot gnu.org
2015-03-06 13:00 ` dominiq at lps dot ens.fr
2015-03-06 13:17 ` burnus at gcc dot gnu.org [this message]
2015-03-11 21:34 ` jb at gcc dot gnu.org
2015-03-11 21:40 ` jb 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-65200-4-DDqksS5hQY@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: link
Be 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).