]> git.notmuchmail.org Git - notmuch/commitdiff
Do not segfault on empty mime parts
authormartin f. krafft <madduck@madduck.net>
Tue, 2 Mar 2010 15:31:28 +0000 (16:31 +0100)
committerCarl Worth <cworth@cworth.org>
Tue, 13 Apr 2010 15:49:06 +0000 (08:49 -0700)
notmuch previously unconditionally checked mime parts for various
properties, but not for NULL, which is the case if libgmime encounters
an empty mime part.

Upon encounter of an empty mime part, the following is printed to
stderr (the second line due to my patch):

  (process:17197): gmime-CRITICAL **: g_mime_message_get_mime_part: assertion `GMIME_IS_MESSAGE (message)' failed
  Warning: Not indexing empty mime part.

This is probably a bug that should get addressed in libgmime, but for
not, my patch is an acceptable workaround.

Signed-off-by: martin f. krafft <madduck@madduck.net>

No differences found