This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: help request: Usage of fopen() leading to heap overflows


Dragon writes:
 > My code compiles fine with gcc. 4.1.1
 > 
 > gcc /home/path/indo18b.c -o /home/path/indo18b -lm -lz

 > I have traced the offending line to the fopen statement. Read through all 
 > documentation I could find that indicates I am not doing anything really 
 > strange or wrong.

Yes, you are.

 > Am I missing something?
 > 
 > Please suggest solution....I am using Fedora Core 5. Embarrassingly, I admit I 
 > am unsure how to adjust the heap or stack. 

You're trashing memory with a wild pointer write somewhere in your
code.  Valgrind is a good tools to use at this point.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]