[Bug libfortran/65200] Handle EPERM when opening files
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 6 13:17:00 GMT 2015
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?
More information about the Gcc-bugs
mailing list