View Single Post
Old 06-02-2004, 08:11 AM  
darkone's Avatar
Join Date: Dec 2001
Posts: 2,230
Default Random crashes & broken .ioFTPD files


there was no such thing as broken .ioFTPD file... fault was in .ioFTPD file reader. When size of block in .ioFTPD file (used for chattr & by some scripts) grows larger than 1024 32bit uints (4096bytes ), daemon re-allocates larger memory block. After reallocation, I had forgot to update the pointer. When reallocating memory, you need to store everything to temporary pointer.. and contents of temporary pointer are moved to real pointer, if reallocation is successful. Now that it kept using the old pointer that was no longer valid, it caused immediate memory corruption and buffer overrun.

I will be releasing patch within a few weeks.
darkone is offline   Reply With Quote