After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 544506 - Crash. Reading message info from db
Crash. Reading message info from db
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.24.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[disk-summary]
Depends on:
Blocks: 543389
 
 
Reported: 2008-07-24 09:11 UTC by Johnny Jacob
Modified: 2013-09-13 01:01 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Johnny Jacob 2008-07-24 09:11:37 UTC
Crash when trying to read cinfo from db.


Comment 1 Johnny Jacob 2008-07-24 09:30:20 UTC
Culprit : 

#define EXTRACT_FIRST_STRING(val) len=strtoul (part, &part, 10); part++; val=g_strndup (part, len);
#define EXTRACT_STRING(val) part++; len=strtoul (part, &part, 10); part++; val=g_strndup (part, len);
#define EXTRACT_FIRST_DIGIT(val) val=strtoul (part, &part, 10);
#define EXTRACT_DIGIT(val) part++; val=strtoul (part, &part, 10);

and itz usage in message_info_from_db (CamelFolderSummary *s, CamelMIRecord *record).

Looks like the expected count from cinfo is not being put in the expected position in the DB. So in my db : 
sqlite> select cinfo from Inbox

 9-multipart 11-alternative 1 8-boundary 28-____UZJSHDHNGATVUEGXPUDO____ 0- 0- 0- 0 0

I think the 'count' is expected at position 1 but somehow moved to position 3 which screwsup the entire parsing leading to overflow .. 

Also add more checks for strtoul (errno, ret val == ULONG_MAX .. )
Comment 2 Johnny Jacob 2008-07-24 11:29:11 UTC
Could migration code be responsible for this ? 
Comment 3 Srinivasa Ragavan 2008-07-24 13:56:05 UTC
Johnny, No. This is some serious issue. Lemme see. I have never tested played with cinfo. IMAP provider right?

Comment 4 Johnny Jacob 2008-07-25 04:34:39 UTC
Yep. IMAP.
Comment 5 Johnny Jacob 2008-07-25 14:31:47 UTC
Bug fixed in this revision.
http://svn.gnome.org/viewvc/evolution-data-server?view=revision&revision=9192

Closing.