]> git.cworth.org Git - obsolete/notmuch-old/commit
lib: call g_mime_init() from notmuch_database_open()
authorKazuo Teramoto <kaz.rag@gmail.com>
Sat, 31 Dec 2011 04:37:41 +0000 (02:37 -0200)
committerDavid Bremner <bremner@debian.org>
Sun, 1 Jan 2012 03:08:15 +0000 (23:08 -0400)
commit442d405ad301bd0bc9dc1d385c21f943ba743308
treef0b84fe8afff65a90dda76152645d85b16bde5d2
parent7da6733e890b913281afd5061cf5a648094a1eb4
lib: call g_mime_init() from notmuch_database_open()

As reported in
id:"CAEbOPGyuHnz4BPtDutnTPUHcP3eYcRCRkXhYoJR43RUMw671+g@mail.gmail.com"
sometimes gmime tries to access a NULL pointer, e.g. g_mime_iconv_open()
tries to access iconv_cache that is NULL if g_mime_init() is not called.
This causes notmuch to segfault when calling gmime functions.

Calling g_mime_init() initializes iconv_cache and others variables needed
by gmime, making sure they are initialized when notmuch calls gmime
functions.

Test marked fix by db.
lib/database.cc
test/python