Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!haven!mimsy!mojo!russotto From: russotto@eng.umd.edu (Matthew T. Russotto) Newsgroups: comp.sys.mac.programmer Subject: Re: Quick Question - Strings Message-ID: <1990Dec14.010008.3316@eng.umd.edu> Date: 14 Dec 90 01:00:08 GMT References: <90347.101213CXT105@psuvm.psu.edu> <1990Dec13.183037.655@eng.umd.edu> Sender: news@eng.umd.edu (C-News) Organization: College of Engineering, Maryversity of Uniland, College Park Lines: 16 In article amanda@visix.com (Amanda Walker) writes: >In article <1990Dec13.183037.655@eng.umd.edu> russotto@eng.umd.edu >(Matthew T. Russotto) writes: > >>"A string beginning with "\p" or "\P" is a Pascal string. It is not terminated >>with a null byte". That strcpy can copy tons of characters and write all over >>memory. > >Well, actually, several C compilers (including, I believe, MPW C) *do* >terminate Pascal-style string literals with a null byte. However, it >is probably safest not to assume that this will work. The statement I put in quotes is from the THINK C manual.... -- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu .sig under construction, like the rest of this campus.