Fix a segfault (buffer overflow for win32 only).