Fixed possible buffer overflow under Windows. Note: Not a security fix.