Can anybody, who gets the crash, test the attached patch.
The cause for the crash seems to be the headerguard at the last line, which has a comment, that starts with NOTE (a keyword for the todolist), and the fact, that there is no line after it, so there is no linefeed (or carriage-return) and the plugin tries to read beyond the buffers length.