Scoping question in C

Henry Spencer henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org
Mon Jun 13 19:02:52 UTC 2005


On Mon, 13 Jun 2005, Taavi Burns wrote:
> But what if the source string is (somehow) not NULL-terminated!  ;)
> Given a source string of unknown size...

If you don't know how long it is, there's really not much you can usefully
do with it.  You *have* to have either NUL termination or a known length. 
Just copying some arbitrary number of characters into a buffer is neither
safe nor reliably useful.

                                                          Henry Spencer
                                                       henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org

--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list