This patch works around the problem that causes invalid memory access error on Cygwin. --- history.c.orig 2011-05-17 00:08:59.297965400 +0900 +++ history.c 2011-05-17 00:10:00.941791700 +0900 @@ -575,6 +575,7 @@ * If there is no more line in the file, false is returned. */ bool read_line(FILE *restrict f, xwcsbuf_T *restrict buf) { + wb_ensuremax(buf, LINE_MAX); while (fgetws(&buf->contents[buf->length], buf->maxlength - buf->length + 1, f)) { size_t len = wcslen(&buf->contents[buf->length]);