Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!van-bc!mdavcr!geh From: geh@mdavcr.UUCP (Graeme Hiebert) Newsgroups: comp.sys.mac.programmer Subject: Re: Disinfectant 2.0 Sample Code Message-ID: <904@carto.mdavcr.UUCP> Date: 24 Jul 90 22:55:28 GMT References: <40562@think.Think.COM> <25571@cs.yale.edu> <40722@think.Think.COM> Organization: /etc/organization Lines: 24 In article <40722@think.Think.COM> ephraim@think.com (Ephraim Vishniac) writes: ~In article <25571@cs.yale.edu> tarr-michael@CS.YALE.EDU (michael tarr) writes: ~>Think C 4.01 also has a bug in strncpy: ~> ... ~ ~So far as I can tell, this is perfectly standard. I'm looking at the ~man pages for strncpy from Ultrix (DEC Unix for VAX) and Sun OS 4.0 ~and both warn that strncpy can produce unterminated strings. Sorry, I ~don't have the Think C libraries manual here, but I'd be amazed if it ~says anything different. I don't know what the Think C manual says, but I do remember Borland's Reference Manual for Turbo C made a point of saying that strncpy does attach a null character on the end of the string, when it actually did not. @%$#!@!!! -g -- -------------------------------------------------------------------- Graeme Hiebert MacDonald Dettwiler, Richmond, BC, CANADA Phone: (604) 278-3411 Internet: geh%mdavcr@wimsey.bc.ca UUCP: ...uunet!van-bc!mdavcr!geh