From ae9e80d9f3065b73de19ab01db27bd0b4860233a Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 19 Apr 2002 22:02:13 +0000 Subject: Don't g_return_val_if_fail here if the boundary is an empty string. See 2002-04-19 Jeffrey Stedfast * camel-multipart.c (write_to_stream): Don't g_return_val_if_fail here if the boundary is an empty string. See bug #23676 for details. The way I see it, we have 2 options: 1) leave this fix the way it is, thus allowing multipart boundaries to be empty-strings; or 2) make camel_multipart_get_boundary() change the boundary to something legal if the boundary is an empty-string. Since the parser should be able to handle an empty-string boundary *and* more importantly because we want to keep the same boundaries as the original raw message so as to be able to verify multipart/signed parts, I vote for solution #1. svn path=/trunk/; revision=16539 --- camel/ChangeLog | 13 +++++++++++++ camel/camel-multipart.c | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index fbfe9c60ce..a4ee868465 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,16 @@ +2002-04-19 Jeffrey Stedfast + + * camel-multipart.c (write_to_stream): Don't g_return_val_if_fail + here if the boundary is an empty string. See bug #23676 for + details. The way I see it, we have 2 options: 1) leave this fix + the way it is, thus allowing multipart boundaries to be + empty-strings; or 2) make camel_multipart_get_boundary() change + the boundary to something legal if the boundary is an + empty-string. Since the parser should be able to handle an + empty-string boundary *and* more importantly because we want to + keep the same boundaries as the original raw message so as to be + able to verify multipart/signed parts, I vote for solution #1. + 2002-04-19 Not Zed * devel-docs/camel-index.txt: Start of a white-paperish document diff --git a/camel/camel-multipart.c b/camel/camel-multipart.c index a9e95c230e..f82b66312a 100644 --- a/camel/camel-multipart.c +++ b/camel/camel-multipart.c @@ -445,10 +445,10 @@ write_to_stream (CamelDataWrapper *data_wrapper, CamelStream *stream) /* get the bundary text */ boundary = camel_multipart_get_boundary (multipart); - + /* we cannot write a multipart without a boundary string */ - g_return_val_if_fail (boundary && *boundary, -1); - + g_return_val_if_fail (boundary, -1); + /* * write the preface text (usually something like * "This is a mime message, if you see this, then -- cgit v1.2.3