🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1622

Re: strncat is insufficient

#1622
From: Bill Torcaso
Date: Mon, 27 Aug 1990 13:35
6 lines
941 bytes
I recall a kernel guru telling me (in the Unix system-III era, which is
when the strn* functions appeared), that strncpy was used to copy a
filename into a 14-character long entry in a directory.  If the name was
shorter, it got NUL-extended.  Otherwise it filled the 14 chars and no
space was 'wasted' on the NUL byte.
Technical Details
Message-ID: <17534@haddock.ima.isc.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!snorkelwacker!mintaka!spdcc!ima!haddock!wildbill
References: <17418@haddock.ima.isc.com> <13598@smoke.BRL.MIL> <1990Aug23.132400.3654@zorch.SF-Bay.ORG> <587@array.UUCP> <620.26d6d0cd@iccgcc.decnet.ab.com> <1990Aug26.023859.12298@zoo.toronto.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!snorkelwacker!mintaka!spdcc!ima!haddock!wildbill
From: wildbill@haddock.ima.isc.com (Bill Torcaso)
Newsgroups: comp.std.c
Subject: Re: strncat is insufficient
Message-ID: <17534@haddock.ima.isc.com>
Date: 27 Aug 90 13:35:06 GMT
References: <17418@haddock.ima.isc.com> <13598@smoke.BRL.MIL> <1990Aug23.132400.3654@zorch.SF-Bay.ORG> <587@array.UUCP> <620.26d6d0cd@iccgcc.decnet.ab.com> <1990Aug26.023859.12298@zoo.toronto.edu>
Reply-To: wildbill@haddock.ima.isc.com (Bill Torcaso)
Organization: Segue Software, Cambridge, MA 02138-5302
Lines: 6