www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/01/18:50:20

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: More string problems!
Date: 29 Aug 1997 08:16:04 GMT
Organization: The National Capital FreeNet
Lines: 25
Message-ID: <5u60g4$8vq@freenet-news.carleton.ca>
References: <34058C10 DOT 254EBF66 AT phs DOT mat-su DOT k12 DOT ak DOT us> <3405C744 DOT 37D0 AT cornell DOT edu>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet2.carleton.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Weizhong Jiang (wj13 AT cornell DOT edu) writes:
> Kevin Dickerson wrote:
>> 
>> main()
>> {
>>    int l1;
>>    char *chr, *buf, *text;
> 
> chr, buf and text are uninitialized pointers. since they have automatic
> scope in this case, they may be pointing anywhere. what is worse, you
> have not claimed the memory they are pointing to, so it writing to those
> areas can do anything from just what you expected to eating your hard
> drive alive.

Not in protected mode. :-) You might get erratic results, what you
expected, or it might seg out, but only in real mode could it trash your
disk FATs.


--
    .*.  Where feelings are concerned, answers are rarely simple [GeneDeWeese]
 -()  <  When I go to the theater, I always go straight to the "bag and mix"
    `*'  bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019