mirror of
https://github.com/apple/swift-nio-imap
synced 2026-11-24 04:38:04 +00:00
Found by Mail during the live-on program. The issue was caused by a "completely nil" address, which we take to mean the end of an envelope group (as per rfc 2822). A completely nil address is valid on its own, without being part of a group, however we assumed that it would always denote the end. If a group hadn't previously been started then we'd crash. Fix by checking if we have a group on top of the stack when attempting to compile individual addresses into groups. Also added a test case to prevent regression.