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?

Reply via email to