Skip to content

Fix #80242: imap_mail_compose() segfaults for multipart with rfc822 #6345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Oct 16, 2020

libc-client expects TYPEMESSAGE with an explicit subtype of RFC822 to
have a nested.msg (otherwise there will be a segfault during free), but
not to have any contents.text.data (this will leak otherwise).


Turns out that this is basically the same issue as PR #6343, but that PR is about a regression in 7.3.24RC1 and 7.4.12RC1, while this "never" worked.

libc-client expects TYPEMESSAGE with an explicit subtype of RFC822 to
have a nested.msg (otherwise there will be a segfault during free), but
not to have any contents.text.data (this will leak otherwise).
@cmb69 cmb69 added the Bug label Oct 16, 2020
@nikic
Copy link
Member

nikic commented Oct 16, 2020

Is there any different to #6343 here, apart from the test?

@cmb69
Copy link
Member Author

cmb69 commented Oct 16, 2020

#6343 fixes this for the first body, and this PR fixes it for following bodies. Actually, both PRs could be combined, but we may consider to cherry-pick #6343 into 7.3.24/7.4.12 (to avoid shipping a regression).

@php-pulls php-pulls closed this in 315b95b Oct 20, 2020
@cmb69 cmb69 deleted the cmb/80242 branch October 20, 2020 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants