[PATCH] Sanitize "Subject:" and "Author:" fields to not contain control characters in notmuch-search

2011-05-09 Thread Florian Friesdorf
On Sun, 8 May 2011 17:40:54 -0400, Austin Clements wrote: > Cool. This seems very reasonable. > > Just some style nits: The three places where you have > "sanitize_string(", there should be a space between the function name > and the paren. fixed > Relatedly, "for(;*loop;loop++){" should be

[PATCH] Sanitize "Subject:" and "Author:" fields to not contain control characters in notmuch-search

2011-05-08 Thread Austin Clements
On Sun, May 8, 2011 at 5:54 PM, Florian Friesdorf wrote: > On Sun, 8 May 2011 17:40:54 -0400, Austin Clements > wrote: >> Also, existing code conventionally uses a variable named "local" >> for function-level talloc contexts such as your ctx_quote. > > In notmuch-search.c there is no variable

[PATCH] Sanitize "Subject:" and "Author:" fields to not contain control characters in notmuch-search

2011-05-08 Thread Austin Clements
Cool. This seems very reasonable. Just some style nits: The three places where you have "sanitize_string(", there should be a space between the function name and the paren. Relatedly, "for(;*loop;loop++){" should be spaced out like "for (; *loop; loop++) {". (Curiously, there seems to be

[PATCH] Sanitize "Subject:" and "Author:" fields to not contain control characters in notmuch-search

2011-05-08 Thread Jameson Graef Rollins
Hey, Florian. I applied this patch to release-candidate/0.6, manually adding in the formatting fixes in the same patch. I also applied the test patch, modified to use the add_message test suite function, which makes the patch a bit simpler. Thanks for the fixes. jamie. -- next part

[PATCH] Sanitize Subject: and Author: fields to not contain control characters in notmuch-search

2011-05-08 Thread Florian Friesdorf
From: Andreas Amann a.am...@ucc.ie When a Subject field contained encoded CRLF sequences, these sequences would appear unfiltered in the output of notmuch search. This confused the notmuch emacs interface leading to Unexpected Output messages. This is now fixed by replacing all characters with

Re: [PATCH] Sanitize Subject: and Author: fields to not contain control characters in notmuch-search

2011-05-08 Thread Austin Clements
Cool. This seems very reasonable. Just some style nits: The three places where you have sanitize_string(, there should be a space between the function name and the paren. Relatedly, for(;*loop;loop++){ should be spaced out like for (; *loop; loop++) {. (Curiously, there seems to be

Re: [PATCH] Sanitize Subject: and Author: fields to not contain control characters in notmuch-search

2011-05-08 Thread Florian Friesdorf
On Sun, 8 May 2011 17:40:54 -0400, Austin Clements amdra...@mit.edu wrote: Cool. This seems very reasonable. Just some style nits: The three places where you have sanitize_string(, there should be a space between the function name and the paren. fixed Relatedly, for(;*loop;loop++){

Re: [PATCH] Sanitize Subject: and Author: fields to not contain control characters in notmuch-search

2011-05-08 Thread Jameson Graef Rollins
Hey, Florian. I applied this patch to release-candidate/0.6, manually adding in the formatting fixes in the same patch. I also applied the test patch, modified to use the add_message test suite function, which makes the patch a bit simpler. Thanks for the fixes. jamie. pgpSo56tz6dHL.pgp