vmime icon indicating copy to clipboard operation
vmime copied to clipboard

Exception, when fetch IMAP account with flag vmime::net::fetchAttributes::STRUCTURE

Open 7i77an opened this issue 10 years ago • 0 comments

Hi Vincent,

I have a issue to IMAP. When invoke fetchmessages with a particular email, with STRUCTURE flag, i have an exception. This is the response:

  • 11 FETCH (FLAGS (\Seen \Flagged) BODYSTRUCTURE ( ("text" "plain" ("charset" "utf-8") NIL NIL "7bit" 3315 111 NIL NIL NIL NIL) ("text" "html" ("charset" "utf-8") NIL NIL "7bit" 13642 192 NIL NIL NIL NIL) "alternative" ("boundary" "=_174225397a091d5291b2b9e2f3abb3f2") "4d6c345b9ftuexperiencia%40better.com!83a!38876!77fbf207!rynof13.pbz!" NIL ) UID 398597 RFC822.HEADER {5036}

I assumed at first that the error was related to the incident of exchange and IMAP4. But I could see that the problem is given here:

if (VIMAP_PARSER_TRY_CHECK(one_char <'('> )) { VIMAP_PARSER_GET(xstring, m_string); VIMAP_PARSER_CHECK(SPACE); VIMAP_PARSER_GET(class body_fld_param, m_body_fld_param); VIMAP_PARSER_CHECK(one_char <')'> ); } else { VIMAP_PARSER_CHECK(NIL); }

At this point, It tries to parse this string: "4d6c345b9ftuexperiencia%40better.com!83a!38876!77fbf207!rynof13.pbz!" NIL) UID 398597 RFC822.HEADER {5036} The parenthesis not found, and then crash checking next values.

e > continue_req_or_response_data > response_data > message_data > msg_att > msg_att_item > xbody > body_type_mpart > body_ext_mpart > body_fld_dsp > one_char <(> 5291b2b9e2f3abb3f2") "4d6c345b9ftuexperiencia%40vol ^ LEAVE(), result=FALSE, pos=276 pos=276 e > continue_req_or_response_data > response_data > message_data > msg_att > msg_att_item > xbody > body_type_mpart > body_ext_mpart > body_fld_dsp > NIL 5291b2b9e2f3abb3f2") "4d6c345b9ftuexperiencia%40vol ^ ENTER(special_atom ), pos=276 e > continue_req_or_response_data > response_data > message_data > msg_att > msg_att_item > xbody > body_type_mpart > body_ext_mpart > body_fld_dsp > NIL > special_atom 5291b2b9e2f3abb3f2") "4d6c345b9ftuexperiencia%40vol ^ LEAVE(), result=FALSE, pos=276 LEAVE(), result=FALSE, pos=276

I appreciate your feedback. Thanks a lot!!

7i77an avatar Jun 03 '15 19:06 7i77an