groff
[Top][All Lists]
Advanced

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

Re: [RFC] input.cpp: Remove use of strncat(3)


From: Larry McVoy
Subject: Re: [RFC] input.cpp: Remove use of strncat(3)
Date: Mon, 5 Dec 2022 15:45:06 -0800
User-agent: Mutt/1.5.24 (2015-08-30)

On Mon, Dec 05, 2022 at 11:39:37PM +0100, Alejandro Colomar wrote:
> See the strncat(3) Linux manual page for details about why strncat(3)
> is actively harmful.

Is there a a known instance of strncpy() causing a problem in the groff
source?

I get it, you are fixing a possible problem and there may not (yet)
be any places where the problem actually occurs but it still could.
I get it.

I used to run a company that did source management tools and we strongly
discouraged these sorts of "clean ups" because they change the author
of that line of code.  Our system made it painless to go from a line of
code to the commit that added that line of code.  Which, if it goes back
to the original commit, is super pleasant for debugging.  If I have go
to your commit, then realize, oh, it used to be the commit before that
and so on, it takes longer to figure out the bug.

Before you say I'm counting angels on the head of a ping, that ability
to debug lead us to knowing, on average, 24x7x365, the root cause of a
bug in under 24 minutes.  If you limited it to business hours, it was
under 5 minutes.  We sold to big companies, they *loved* our support.

So there is real value to asking yourself "Am I actually fixing a real
bug?"

And it is groff, not some mission critical database.  If I were in
charge, I veto these sorts of commits and fix the problems if/when
they arise and have a cleaner history.

But I'm not in charge, so...



reply via email to

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