🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.2bsd
Article #179

Re: V1.21 (strncat is broken)

#179
From: John P. Nelson
Date: Thu, 07 Jan 1988 17:42
9 lines
760 bytes
>Description:
>	strncat(3) doesn't truncate strings correctly.

Please don't "fix" this "bug".  It is DOCUMENTED to work this way.  If
the second string is longer than the size "n" supplied, then NO NULL
TERMINATER is appended.  It is your MISUSE of "strncat" at fault here!

I agree, it is a pain in the ass, but this is the way strncat has
always worked since the beginning of C!
Technical Details
Message-ID: <4557@teddy.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!panda!teddy!jpn
References: <8801062002.AA15696@okeeffe.Berkeley.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!panda!teddy!jpn
From: jpn@teddy.UUCP (John P. Nelson)
Newsgroups: comp.bugs.2bsd
Subject: Re: V1.21 (strncat is broken)
Message-ID: <4557@teddy.UUCP>
Date: 7 Jan 88 17:42:32 GMT
References: <8801062002.AA15696@okeeffe.Berkeley.EDU>
Reply-To: jpn@teddy.UUCP (John P. Nelson)
Organization: GenRad, Inc., Concord, Mass.
Lines: 9