What steps will reproduce the problem?
1. listing the c:\ directory
What is the expected output? What do you see instead?
a directory listing, it crashes
What version of the product are you using? On what operating system?
mongoose 2.8, windows 7, vs2008
Please provide any additional information below.
Calling mg_stat on a system file which is locked by the OS, causes struct
mgstat *stp not be filled in.
when print_dir_entry is called with this struct it causes this line
(void) strftime(mod, sizeof(mod), "%d-%b-%Y %H:%M",
localtime(&de->st.mtime));
to throw as st.mtime can be negative, which crashes the server
solution, always fill in the mgstat struct even if GetFileAttributesExW
fails
Original issue reported on code.google.com by Steve.M....@googlemail.com on 14 Mar 2010 at 12:38
Original issue reported on code.google.com by
Steve.M....@googlemail.com
on 14 Mar 2010 at 12:38