fix: crash in message.combineParts when copying a nil slice

This commit is contained in:
James Houlahan
2020-06-03 13:52:11 +02:00
parent 6070a3b7cc
commit 80b2bfc2a5
2 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,7 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
* GODT-390 Don't logout user if AuthRefresh fails because internet was off
* GODT-341 Fixed flaky unittest for Store synchronization cooldown
* Crash when failing to match necessary html element
* Crash in message.combineParts when copying nil slice
## [v1.2.7] Donghai-hotfix - beta (2020-05-07)

View File

@ -140,6 +140,9 @@ func combineParts(m *pmapi.Message, parts []io.Reader, headers []textproto.MIMEH
att := parseAttachment(filename, mediaType, h)
b := &bytes.Buffer{}
if d == nil {
continue
}
if _, err = io.Copy(b, d); err != nil {
continue
}