aerc/lib
Robin Jarry 074b0a1bd8 view,list: fix crash when viewing incomplete imap messages
With IMAP, due to an unidentified reason, some messages to not have any
body accessible. When viewing them, aerc crashes:

  git.sr.ht/~sircmpwn/aerc/lib.usePGP
          lib/messageview.go:37
  git.sr.ht/~sircmpwn/aerc/lib.NewMessageStoreView
          lib/messageview.go:67
  git.sr.ht/~sircmpwn/aerc/commands/account.ViewMessage.Execute
          commands/account/view.go:45
  git.sr.ht/~sircmpwn/aerc/commands.(*Commands).ExecuteCommand
          commands/commands.go:66
  main.execCommand
          aerc.go:61
  main.main.func2
          aerc.go:160
  aerc crashed: runtime error: invalid memory address or nil pointer
  dereference

Check the pointer before dereferencing.

Also, add a global check in ParseMessageFormat where a similar issue may
occur.

Signed-off-by: Robin Jarry <robin@jarry.cc>
2021-10-28 16:38:23 +02:00
..
format view,list: fix crash when viewing incomplete imap messages 2021-10-28 16:38:23 +02:00
sort Preserve sorting order in search results 2019-10-09 19:46:43 -04:00
templates compose: use a proper header instead of a string map 2020-11-14 15:40:13 +01:00
ui view,compose: use border color to separate headers from body 2021-10-28 16:38:23 +02:00
uidstore Create UIDStore package 2019-07-12 11:09:47 -04:00
dirstore.go Move msgstore map to dirstore 2019-07-26 14:15:27 -04:00
history.go Add command history and cycling 2019-07-26 14:29:34 -04:00
keystore.go Initial support for PGP decryption & signatures 2020-03-03 16:49:52 -05:00
messageview.go view,list: fix crash when viewing incomplete imap messages 2021-10-28 16:38:23 +02:00
msgstore.go Fix linter warnings 2021-02-26 22:14:58 +01:00
oauthbearer.go Add `oauthbearer` support for SMTP 2020-08-13 07:44:43 +02:00
open.go Refactor lib/open to accept user provided arguments 2021-01-30 14:04:23 +01:00
socket.go lib: fix an out of bounds panic in the server 2020-02-13 10:26:12 -05:00
structure_helpers.go FindFirstNonMultipart: return the proper path 2021-03-07 14:52:42 +01:00