diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2020-05-19 13:01:09 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2020-05-19 13:01:09 +0300 |
commit | 671d473894692c2596b42a74c940a85589d1d66c (patch) | |
tree | ff00045aa19323f8360da150180e6614c505ef39 /melib/src/email/parser.rs | |
parent | f8961f493a4374385f55df48bf58cf22a8330145 (diff) |
email/parser: avoid slice index panic if slice is empty
Diffstat (limited to 'melib/src/email/parser.rs')
-rw-r--r-- | melib/src/email/parser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/melib/src/email/parser.rs b/melib/src/email/parser.rs index 192ad364..827550fe 100644 --- a/melib/src/email/parser.rs +++ b/melib/src/email/parser.rs @@ -521,7 +521,7 @@ fn display_addr(input: &[u8]) -> IResult<&[u8], Address> { }; IResult::Done( - &input[rest_start..], + input.get(rest_start..).unwrap_or_default(), Address::Mailbox(MailboxAddress { raw, display_name, |