[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: Mon, 24 Oct 2016 17:56:02 -0400

>Agreed.  But crapping out breaks the silence so that area can be worked

I think just calling abort() is lousy behavior in general.  But maybe
there's a middle ground; a lot of these cases are just because we didn't
want to allocate a dynamic buffer.  Maybe we should start using asprintf()
a lot more?  Although ... crud, I take your point that a small change
is a lot easier than a big change.

>At the moment, there's many strncpy calls and they can't all be
>rewritten to be malloc or something else.  Another alternative is
>reporting on stderr, though spew from a loop would be annoying.  Perhaps
>the truncating-copy routine could stop reporting after a few.  When
>they're fixed, the next ones will project.

My concern there is our release cycles have been long, and I'd hate to
have code that barfs on emails released for a few years.  A quick look
suggests to me that we could legitimately barf on a lot of those calls,
but I'd rather we took a careful look at each one that deals with actual
on-wire email.


reply via email to

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