[PHP-DEV] cvs: /php3/functions imap.c From: Charles Hagenbuch (chagenbu <email protected>)
Date: 08/18/99

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 <email protected>> |
    +----------------------------------------------------------------------+
  */
-/* $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(&parametres);
                 object_init( &param );
                 imap_add_body( &param, body );

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>