Newsgroups: comp.os.msdos.djgpp Subject: Re: SOLVED !!!! Re: Strange problem again. From: vischne AT ibm DOT net-nospam (root) Organization: The Light References: <3439D9B8 DOT 4C40 AT post DOT comstar DOT ru> <343A14FF DOT 41F2 AT post DOT comstar DOT ru> MIME-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII NNTP-Posting-Host: 32.100.34.104 Message-ID: <343d6ebd.0@news3.ibm.net> Date: 9 Oct 97 23:54:37 GMT Lines: 26 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article <343A14FF DOT 41F2 AT post DOT comstar DOT ru>, zager AT post DOT comstar DOT ru says... > >Dim Zegebart wrote: >> >> The line in malloc() is >> >> /* remove from linked list */ >> nextf[bucket] = op->ov_next; > >Guys !!! I found it !!! It was in two years old code ported from TC. >The problem obvious : > >char *buf; >int l; >FILE *f; >.. >l=filelength(fileno(f)); >buf=(char*)malloc(l+1); >buf[l+1]=0; // !!!!!!!!!!!!!!!! Here is (was) my problem ( buf[l]; is >correct ) > >Thank's for all who help me to solve it ! > Congratulations. The classic method of solving problems is to ask other people to help, then find the answer yourself.