Date: 08/18/99
- Next message: Bug Database: "[PHP-DEV] Bug #1953 Updated: Certain messages cause php3's imap functions to crash."
- Previous message: christophe.massiot <email protected>: "[PHP-DEV] PHP 4.0 Bug #2105: Crash in escapeshellcmd with an empty string"
- Next in thread: Mark Musone: "Re: [PHP-DEV] cvs: /php3/functions imap.c"
- Reply: Mark Musone: "Re: [PHP-DEV] cvs: /php3/functions imap.c"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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(¶metres);
object_init( ¶m );
imap_add_body( ¶m, 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>
- Next message: Bug Database: "[PHP-DEV] Bug #1953 Updated: Certain messages cause php3's imap functions to crash."
- Previous message: christophe.massiot <email protected>: "[PHP-DEV] PHP 4.0 Bug #2105: Crash in escapeshellcmd with an empty string"
- Next in thread: Mark Musone: "Re: [PHP-DEV] cvs: /php3/functions imap.c"
- Reply: Mark Musone: "Re: [PHP-DEV] cvs: /php3/functions imap.c"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

