[PATCH] notmuch: Fix off-by-one errors if a header is >200 characters long.

2010-06-03 Thread Carl Worth
On Wed, 28 Apr 2010 11:45:41 +0100, dme at dme.org wrote: > From: David Edmondson > > If a single header is more than 200 characters long a set of 'off by > one' errors cause memory corruption. ... > This is the cause of my segmentation fault (or bus error) during > `notmuch reply'. The patch is

[PATCH] notmuch: Fix off-by-one errors if a header is >200 characters long.

2010-04-28 Thread d...@dme.org
From: David Edmondson If a single header is more than 200 characters long a set of 'off by one' errors cause memory corruption. When allocating memory with: a = malloc (len); the last usable byte of the memory is 'a + len - 1' rather than 'a + len'. Fix the same bug when

[PATCH] notmuch: Fix off-by-one errors if a header is 200 characters long.

2010-04-28 Thread dme
From: David Edmondson d...@dme.org If a single header is more than 200 characters long a set of 'off by one' errors cause memory corruption. When allocating memory with: a = malloc (len); the last usable byte of the memory is 'a + len - 1' rather than 'a + len'. Fix the same bug when