php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2627 copy/paste bug in imap_fetchstructure ?
Submitted: 1999-10-28 07:10 UTC Modified: 1999-10-28 07:36 UTC
From: hholzgra at media-engineering dot de Assigned:
Status: Closed Package: IMAP related
PHP Version: 3.0 Latest CVS (28/10/1999) OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
5 + 6 = ?
Subscribe to this entry?

 
 [1999-10-28 07:10 UTC] hholzgra at media-engineering dot de
imap_fetchstructure does not return the right value 
in id when ifid is true

id is set to the value of 'description' instead of 'id'

( looks like a copy/paste bug )

this bug is still present in both php3 und php4 cvs

my patch for php3:

-----8<-------------------------------------------------
> cvs diff imap.c
Index: imap.c
======================================
RCS file: /repository/php3/functions/imap.c,v
retrieving revision 1.68
diff -u -r1.68 imap.c
--- imap.c      1999/08/19 17:01:42     1.68
+++ imap.c      1999/10/28 11:09:36
@@ -2729,7 +2729,7 @@
        }
        if ( body->id ){
          add_property_long( return_value, "ifid", 1 );
-         if(body->description) add_property_string( return_value, "id",  body->description, 1 );
+         if(body->description) add_property_string( return_value, "id",  body->id, 1 );
        } else {
          add_property_long( return_value, "ifid", 0 );
        }


------------------------------------------------->8-----


and for php4:

-----8<-------------------------------------------------
> cvs diff ext/imap/imap.c
Index: ext/imap/imap.c
==============================================
RCS file: /repository/php4/ext/imap/imap.c,v
retrieving revision 1.15
diff -u -r1.15 imap.c
--- ext/imap/imap.c     1999/09/29 21:18:35     1.15
+++ ext/imap/imap.c     1999/10/28 11:07:32
@@ -2203,7 +2203,7 @@
        }
        if ( body->id ){
                add_property_long( return_value, "ifid", 1 );
-               if(body->description) add_property_string( return_value, "id",  body->description, 1 );
+               if(body->description) add_property_string( return_value, "id",  body->id, 1 );
        } else {
                add_property_long( return_value, "ifid", 0 );
        }

--------------------------->8-----

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-10-28 07:36 UTC] hholzgra at media-engineering dot de
stupid me, i do not now yet what i am talking about
i'll get back on this one later
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 05:01:27 2024 UTC