GNOME Bugzilla – Bug 521872
set_respect_content_length() broken since 2.2.16
Last modified: 2008-03-13 21:09:07 UTC
Please describe the problem: Parsing messages that contain no content-length header changed in approximately 2.2.16. It used to behave as expected. currently, the parser treats entire stream as single message if set_respect_content_length() is set. Steps to reproduce: 1. Compile attached test program. 2. Run it on a test mailbox. 3. Actual results: With current svn, only one line is printed. Expected results: Both From lines should be printed. Does this happen every time? Yes, it does. Other information:
Created attachment 107094 [details] gmime_parser_test.c Test program.
Created attachment 107096 [details] content.mbox Test mbox. Expected output: 0 89 Danny <danny@example.com> 89 184 Barbara <barbara@example.com> Output with current source: 0 184 Danny <danny@example.com>
hmmm, it's printing both lines for me with svn: [fejj@tazmanian-devil gmime]$ ./test content.mbox 0 89 Danny <danny@example.com> 89 184 Barbara <barbara@example.com> note that I did have to change the test program because my gmime is built with --enable-largefile, so I had to change the printf to: printf("%5lld %5lld %s\n", start, end, mime_message->from); can you confirm?
just rebuilt without --enable-largefile, and I get the same results
I am running on x86_64, is this the same architecture you use? I use gcc-4.1.2-33 (fc8 setup). I should say there were similar issues reported on balsa-list when debian upgraded from 2.2.15 but the initial reports were rather vague.
I'm on IA32, don't have access to any 64bit machines
Oh, that's the catch! I can confirm 32-bit build behaves as expected. There must be some data/pointer size related error...
Created attachment 107248 [details] [review] bugfix.patch Pretty trivial (easy to say now!) bug fix.
thanks! committed to svn, will try to make a release soon.