On Mon, 05 Apr 2010 10:36:38 +0100, David Edmondson wrote:
> Agreed. How about this patch:
>
> http://github.com/dme/notmuch/commit/5f23ae341788d28e455e53488d184d8caaa618c5
> ?
Thanks, David.
(And thanks also, to David Bremner for providing a version with
cleaned-up whitespace issues.)
This
On Thu, 01 Apr 2010 14:05:06 +0200, Michal Sojka wrote:
> On Thu, 04 Mar 2010, Gregor Hoffleit wrote:
> > - printf (", \"content\": %s", json_quote_str (ctx, (char *)
> > part_content->data));
> > + content_data = talloc_size (ctx, part_content->len+1);
> > + memcpy (content_data, (char
On Thu, 01 Apr 2010 14:05:06 +0200, Michal Sojka sojk...@fel.cvut.cz wrote:
On Thu, 04 Mar 2010, Gregor Hoffleit wrote:
- printf (, \content\: %s, json_quote_str (ctx, (char *)
part_content-data));
+ content_data = talloc_size (ctx, part_content-len+1);
+ memcpy (content_data,
On Mon, 05 Apr 2010 10:36:38 +0100, David Edmondson d...@dme.org wrote:
Agreed. How about this patch:
http://github.com/dme/notmuch/commit/5f23ae341788d28e455e53488d184d8caaa618c5
?
Thanks, David.
(And thanks also, to David Bremner for providing a version with
cleaned-up whitespace
Both of you Davids are indeed completely right. Even more since the
next command in the patch after memcpy zeroes that byte.
This is how it's meant to be:
+content_data = talloc_size (ctx, part_content->len+1);
+memcpy (content_data, (char *)part_content->data, part_content->len);
+
On Thu, 04 Mar 2010, Gregor Hoffleit wrote:
> - printf (", \"content\": %s", json_quote_str (ctx, (char *)
> part_content->data));
> + content_data = talloc_size (ctx, part_content->len+1);
> + memcpy (content_data, (char *)part_content->data, part_content->len+1);
> +
On Thu, 01 Apr 2010 08:40:37 -0300, David Bremner wrote:
> On Thu, 04 Mar 2010 11:49:48 +0100, Gregor Hoffleit
> wrote:
> > In format_part_json, part_content->data is not a null terminated
> > string.
>
> I'd like to see this bug fixed,
+1.
> and the patch is pretty small, but...
>
> >
On Thu, 04 Mar 2010 11:49:48 +0100, Gregor Hoffleit
wrote:
> In format_part_json, part_content->data is not a null terminated
> string.
I'd like to see this bug fixed, and the patch is pretty small, but...
> Instead, we have to use part_content->len.
> + content_data = talloc_size (ctx,
On Thu, 04 Mar 2010 11:49:48 +0100, Gregor Hoffleit gre...@hoffleit.de wrote:
In format_part_json, part_content-data is not a null terminated
string.
I'd like to see this bug fixed, and the patch is pretty small, but...
Instead, we have to use part_content-len.
+ content_data =
Both of you Davids are indeed completely right. Even more since the
next command in the patch after memcpy zeroes that byte.
This is how it's meant to be:
+content_data = talloc_size (ctx, part_content-len+1);
+memcpy (content_data, (char *)part_content-data, part_content-len);
+
In format_part_json, part_content->data is not a null terminated string.
Instead, we have to use part_content->len.
---
notmuch-show.c |7 ++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/notmuch-show.c b/notmuch-show.c
index 1a1d601..4b755e9 100644
--- a/notmuch-show.c
11 matches
Mail list logo