Module: sems Branch: master Commit: c66f8c025c45eceb98e05f6d0215808de7e792e3 URL: https://github.com/sems-server/sems/commit/c66f8c025c45eceb98e05f6d0215808de7e792e3
Author: Camille Oudot <camille.ou...@orange.com> Committer: Camille Oudot <camille.ou...@orange.com> Date: 2015-08-19T17:49:40+02:00 core: fix multipart delimiter parser This fixes a bug happening when a body-part of a multipart body ends with CRLF: in this case SEMS considers the body-part ending CRLF(s) as being part of the delimiter. A delimiter starts with only one CRLF, so we have to reset the pointer to the delimiter begin during a transition from B_LF to B_CR state. --- Modified: core/AmMimeBody.cpp --- Diff: https://github.com/sems-server/sems/commit/c66f8c025c45eceb98e05f6d0215808de7e792e3.diff Patch: https://github.com/sems-server/sems/commit/c66f8c025c45eceb98e05f6d0215808de7e792e3.patch --- diff --git a/core/AmMimeBody.cpp b/core/AmMimeBody.cpp index 29e6820..4445fd7 100644 --- a/core/AmMimeBody.cpp +++ b/core/AmMimeBody.cpp @@ -421,6 +421,7 @@ int AmMimeBody::findNextBoundary(unsigned char** beg, unsigned char** end) break; case CR: st = B_CR; + *beg = c; break; default: st = B_START; _______________________________________________ Semsdev mailing list Semsdev@lists.iptel.org http://lists.iptel.org/mailman/listinfo/semsdev