It is *not* dependant on the raw message. I've tried this with a messages that first went haywire and on reinsertion always came out clean.

I don't have any traces at hand. It doesn't happen very often.

Ilja Booij wrote:
Hi all,

we should still resolve the bug that causes IMAP messages to parse badly
(resulting in empty messages or errors).  I still need more info on when
things wrong. Can people who have had the problem please post some
traces and the raw messages. I'd like to be able to see a trace of the
message being inserted, and and a trace of the IMAP server trying to
retreive the message.

Oh, and please update to current CVS, to make sure we're working on the
same code. :)

Thanks,
Ilja

On Mon, 2004-04-05 at 12:07, Ilja Booij wrote:

Paul J Stevens wrote:


Here's a suspect line possibly responsible for the binary chars in messageblks.


in db.c,db_insert_message_block_physmessage line 856:

       escaped_query = (char *) my_malloc(sizeof(char) * maxesclen);

I don't see a:

   memset(escaped_query,'\0',sizeof(char) * maxesclen);

around.

I don't think this causes the malfunction. The escaped_query string is printed to by snprintf() which adds a '\0' to the end. This last character is then overwritten by db_escape_query(), adding another '\0', which is again overwritten by the last snprintf(), which adds the last '\0'. So, the string is always terminated. I did add the memset() call though, because that should make it a lot safer to change this function in the future. And besides, it's just good practice to NULL all strings before using them.

Ilja

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://twister.fastxs.net/mailman/listinfo/dbmail-dev



_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://twister.fastxs.net/mailman/listinfo/dbmail-dev


--
  ________________________________________________________________
  Paul Stevens                                         [EMAIL PROTECTED]
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands_______________________________________www.nfg.nl

Reply via email to