Windows: prevent buffer overrun in cklog