[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] strncpy(3), die, die, die.

From: Ken Hornstein
Subject: Re: [Nmh-workers] strncpy(3), die, die, die.
Date: Sat, 29 Oct 2016 12:22:27 -0400

>    strncpy(sm_reply.text, str, sizeof(sm_reply.text));
>    sm_reply.text[sizeof(sm_reply.text) - 1] = '\0';

If this is what I think it is ... you know, I think this truncation is

There are a number of cases where we are getting a error message from,
say, an SMTP server and display it to the user.  In that case, I think
truncating a displayed error message is perfectly fine and should not
result in an abort().  I believe when I wrote netsec that all error
messages are returned in allocated memory so that shouldn't be an issue,
but changing all of the callers of it was too big of a job.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]