4

Buffer Overflow - fread.c and fvwrite.c sources

view full story
linux-howto

http://www.linuxquestions.org – Hi All, I am new to linux and Programming. Currently investigating on buffer overflow issues. Inside the file src/lib/libc/stdio/fread.c, fvwrite.c . There is a memcpy function. 1. at line 81 in fread.c - (void)memcpy((void *)p, (void *)fp->_p, (size_t)r); 2. and at line 168 in fvwrite.c. Which requires understanding of FILE structure. and its various contents as defined in the file stdio.h like _p, _r, _flags etc. I have written a sample code to find out the contents of the FILE structure. It opens a sample file (by FILE *fp ), does some read/write operations on it. and at the end p (HowTos)