]> git.notmuchmail.org Git - notmuch/commitdiff
Avoid reading a byte just before our allocated buffer.
authorCarl Worth <cworth@cworth.org>
Fri, 16 Oct 2009 20:38:43 +0000 (13:38 -0700)
committerCarl Worth <cworth@cworth.org>
Fri, 16 Oct 2009 20:38:43 +0000 (13:38 -0700)
When looking for a trailing ':' to introduce a quotation we peek at
the last character before a newline. But for blank lines, that's not
where we want to look. And when the first line in our buffer is a
blank line, we're underrunning our buffer. The fix is easy---just
bail early on blank lines since they have no terms anyway.

Thanks to valgrind for pointing out this error.


No differences found