mailparse: abort message parsing when max mime parts is exceeded (#8588)
commit0506771eaa3ef33323dd2a3d1126ab309a2919f3
authorStephan Zuercher <szuercher@slack-corp.com>
Tue, 29 Oct 2019 18:02:22 +0000 (29 11:02 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 29 Oct 2019 18:04:32 +0000 (29 11:04 -0700)
tree1ede4249243a8260360d5d98c2f6d0d0374e493e
parent60efdd825dbc4b434192d2c1740a2dd104904198
mailparse: abort message parsing when max mime parts is exceeded (#8588)

Summary:
Aborts mail message parsing when the maximum number of MIME parts
has been reached, rather than continuing to process message lines.

Fixes https://github.com/facebook/hhvm/issues/8532
Pull Request resolved: https://github.com/facebook/hhvm/pull/8588

Reviewed By: jjergus

Differential Revision: D18063857

fbshipit-source-id: f0e8948ee37712e8c1d14e23bac2be1db344a370
hphp/runtime/ext/mailparse/mime.cpp
hphp/test/slow/ext_mailparse/ext_mailparse.php
hphp/test/slow/ext_mailparse/ext_mailparse.php.expectf [moved from hphp/test/slow/ext_mailparse/ext_mailparse.php.expect with 97% similarity]