mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
fixed bug 21869 -- forwarding multipart/signed message crashes the system; check for the subpart isn't a multipart mime object prior setting up decomposing part function; r=rhp
This commit is contained in:
parent
f9274cbe6a
commit
95ac1fac81
@ -311,9 +311,20 @@ MimeMultipart_create_child(MimeObject *obj)
|
||||
if ( !mime_typep(obj,(MimeObjectClass*)&mimeMultipartRelatedClass) &&
|
||||
!mime_typep(obj,(MimeObjectClass*)&mimeMultipartAlternativeClass) &&
|
||||
!mime_typep(obj,(MimeObjectClass*)&mimeMultipartSignedClass) &&
|
||||
#ifdef MIME_DETAIL_CHECK
|
||||
!mime_typep(body, (MimeObjectClass*)&mimeMultipartRelatedClass) &&
|
||||
!mime_typep(body, (MimeObjectClass*)&mimeMultipartAlternativeClass) &&
|
||||
!mime_typep(body,(MimeObjectClass*)&mimeMultipartSignedClass)
|
||||
#else
|
||||
/* bug 21869 -- due to the fact that we are not generating the
|
||||
correct mime class object for content-typ multipart/signed part
|
||||
the above check failed. to solve the problem in general and not
|
||||
to cause early temination when parsing message for opening as
|
||||
draft we can simply make sure that the child is not a multipart
|
||||
mime object. this way we could have a proper decomposing message
|
||||
part functions set correctly */
|
||||
!mime_typep(body, (MimeObjectClass*) &mimeMultipartClass)
|
||||
#endif
|
||||
#ifdef RICHIE_VCARD
|
||||
&& !mime_typep(body, (MimeObjectClass*)&mimeInlineTextVCardClass)
|
||||
#endif
|
||||
@ -458,10 +469,21 @@ MimeMultipart_close_child(MimeObject *object)
|
||||
{
|
||||
if ( !mime_typep(object,(MimeObjectClass*)&mimeMultipartRelatedClass) &&
|
||||
!mime_typep(object,(MimeObjectClass*)&mimeMultipartAlternativeClass) &&
|
||||
!mime_typep(object,(MimeObjectClass*)&mimeMultipartSignedClass) &&
|
||||
#ifdef MIME_DETAIL_CHECK
|
||||
!mime_typep(kid,(MimeObjectClass*)&mimeMultipartRelatedClass) &&
|
||||
!mime_typep(kid,(MimeObjectClass*)&mimeMultipartAlternativeClass) &&
|
||||
!mime_typep(object,(MimeObjectClass*)&mimeMultipartSignedClass) &&
|
||||
!mime_typep(kid,(MimeObjectClass*)&mimeMultipartSignedClass)
|
||||
#else
|
||||
/* bug 21869 -- due to the fact that we are not generating the
|
||||
correct mime class object for content-typ multipart/signed part
|
||||
the above check failed. to solve the problem in general and not
|
||||
to cause early temination when parsing message for opening as
|
||||
draft we can simply make sure that the child is not a multipart
|
||||
mime object. this way we could have a proper decomposing message
|
||||
part functions set correctly */
|
||||
!mime_typep(kid,(MimeObjectClass*) &mimeMultipartClass)
|
||||
#endif
|
||||
#ifdef RICHIE_VCARD
|
||||
&& !mime_typep(kid, (MimeObjectClass*)&mimeInlineTextVCardClass)
|
||||
#endif
|
||||
@ -504,9 +526,20 @@ MimeMultipart_parse_child_line (MimeObject *obj, char *line, PRInt32 length,
|
||||
if (!mime_typep(obj,(MimeObjectClass*)&mimeMultipartAlternativeClass) &&
|
||||
!mime_typep(obj,(MimeObjectClass*)&mimeMultipartRelatedClass) &&
|
||||
!mime_typep(obj,(MimeObjectClass*)&mimeMultipartSignedClass) &&
|
||||
#ifdef MIME_DETAIL_CHECK
|
||||
!mime_typep(kid,(MimeObjectClass*)&mimeMultipartAlternativeClass) &&
|
||||
!mime_typep(kid,(MimeObjectClass*)&mimeMultipartRelatedClass) &&
|
||||
!mime_typep(kid,(MimeObjectClass*)&mimeMultipartSignedClass)
|
||||
!mime_typep(kid,(MimeObjectClass*)&mimeMultipartSignedClass)
|
||||
#else
|
||||
/* bug 21869 -- due to the fact that we are not generating the
|
||||
correct mime class object for content-typ multipart/signed part
|
||||
the above check failed. to solve the problem in general and not
|
||||
to cause early temination when parsing message for opening as
|
||||
draft we can simply make sure that the child is not a multipart
|
||||
mime object. this way we could have a proper decomposing message
|
||||
part functions set correctly */
|
||||
!mime_typep(kid, (MimeObjectClass*) &mimeMultipartClass)
|
||||
#endif
|
||||
#ifdef RICHIE_VCARD
|
||||
&& !mime_typep(kid, (MimeObjectClass*)&mimeInlineTextVCardClass)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user