Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbatt!cwruecmp!hal!ncoast!allbery From: allbery@ncoast.UUCP Newsgroups: comp.os.minix Subject: Re: Bug in library routine getenv() Message-ID: <2494@ncoast.UUCP> Date: Sun, 10-May-87 13:34:40 EDT Article-I.D.: ncoast.2494 Posted: Sun May 10 13:34:40 1987 Date-Received: Wed, 13-May-87 05:00:07 EDT References: <3860@cae780.TEK.COM> <868@mimir.dmt.oz> Reply-To: allbery@ncoast.UUCP (Brandon Allbery) Followup-To: comp.os.minix Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 24 As quoted from <868@mimir.dmt.oz> by dcm@mimir.dmt.oz (Dennis Mills): +--------------- | in article <3860@cae780.TEK.COM>, hubble@cae780.TEK.COM (Larry Hubble) says: | > | > I believe there is also a bug in the | > library routine strncpy -- it doesn't null terminate the string if the string | > to copy is really longer that "n" characters. | | This is the correct documented behaviour of 'strncpy'. +--------------- I can see where he would get confised, though; System V documents it as *always* null-terminating the string. No idea how V7 does it. System III and Xenix don't say one way or the other. ++Brando -- Copyright (C) 1987 Brandon S. Allbery -- you can redistribute only if your recipients can. Brandon S. Allbery {decvax,cbatt,cbosgd}!cwruecmp!ncoast!allbery Tridelta Industries {ames,mit-eddie,talcott}!necntc!ncoast!allbery 7350 Corporate Blvd. necntc!ncoast!allbery@harvard.HARVARD.EDU Mentor, OH 44060 +01 216 255 1080 (also eddie.MIT.EDU)