cvs: /php3/functions imap.c
| From: | Charles Hagenbuch | Date: | Wed, 18 Aug 1999 17:15:05 +0000 |
| Subject: | cvs: /php3/functions imap.c | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-9987@lists.php.net to get a copy of this message | ||
chagenbu Wed Aug 18 13:15:05 1999 EDT
Modified files:
/php3/functions imap.c
Log:
cjh: in imap_add_body, strncasecmp was being used to test if a part was of
type message/rfc822. This caused parts of type message/rfc822-headers to be
treated as message/rfc822s, which in turn caused a segfault.
Using strcasecmp fixes the problem.
Index: php3/functions/imap.c
diff -u php3/functions/imap.c:1.64 php3/functions/imap.c:1.65
--- php3/functions/imap.c:1.64 Sun Aug 15 13:27:19 1999
+++ php3/functions/imap.c Wed Aug 18 13:15:04 1999
@@ -33,7 +33,7 @@
| Andrew Skalski <askalski@chek.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: imap.c,v 1.64 1999/08/15 17:27:19 chagenbu Exp $ */
+/* $Id: imap.c,v 1.65 1999/08/18 17:15:04 chagenbu Exp $ */
#define IMAP41
@@ -2166,9 +2166,8 @@
/* encapsulated message ? */
- /* if ( ( body->type == TYPEMESSAGE ) && (body->CONTENT_MSG_BODY) &&
(!strncasecmp(body->subtype, "rfc822", 6))) { */
- if ( ( body->type == TYPEMESSAGE ) && (!strncasecmp(body->subtype,
"rfc822", 6))) {
- body=body->CONTENT_MSG_BODY;
+ if ((body->type == TYPEMESSAGE) && (!strcasecmp(body->subtype, "rfc822")))
{
+ body = body->CONTENT_MSG_BODY;
array_init(¶metres);
object_init( ¶m );
imap_add_body( ¶m, body );