git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] mailinfo: ensure handle_filter gets only one line at a time
@ 2008-02-15 21:53 Jay Soffian
  2008-02-15 21:53 ` [PATCH 2/3] mailinfo: support rfc3676 (format=flowed) text/plain messages Jay Soffian
  2008-02-15 23:24 ` [PATCH 1/3] mailinfo: ensure handle_filter gets only one line at a time Junio C Hamano
  0 siblings, 2 replies; 8+ messages in thread
From: Jay Soffian @ 2008-02-15 21:53 UTC (permalink / raw)
  To: git; +Cc: Jay Soffian, Junio C Hamano, Johannes Schindelin

handle_filter() is only supposed to get one line at a time.
handle_body() already ensures this after decoding BASE64 messages per
this comment:

/* this is a decoded line that may contain
 * multiple new lines.  Pass only one chunk
 * at a time to handle_filter()
 */

QP messages need to be similarly processed since decoding QP can also
add newlines.

Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
---
I broke this change out into it's own patch since it's independent of
the format=flowed additions.

 builtin-mailinfo.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index 2600847..11f154b 100644
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
@@ -818,6 +818,7 @@ static void handle_body(void)
 
 		switch (transfer_encoding) {
 		case TE_BASE64:
+		case TE_QP:
 		{
 			char *op = line;
 
-- 
1.5.4.1.1281.g75df

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-02-16  6:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-15 21:53 [PATCH 1/3] mailinfo: ensure handle_filter gets only one line at a time Jay Soffian
2008-02-15 21:53 ` [PATCH 2/3] mailinfo: support rfc3676 (format=flowed) text/plain messages Jay Soffian
2008-02-15 21:53   ` [PATCH 3/3] test mailinfo rfc3676 support Jay Soffian
2008-02-15 23:24 ` [PATCH 1/3] mailinfo: ensure handle_filter gets only one line at a time Junio C Hamano
2008-02-15 23:37   ` Jay Soffian
2008-02-16  6:17     ` Junio C Hamano
2008-02-16  6:22       ` Junio C Hamano
2008-02-16  6:51       ` Jay Soffian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).