notmuch/lib
Todd ef5b4947d8 lib: Fix use after free
_thread_set_subject_from_message sometimes replaces the subject, making the
cur_subject point to free'd memory

==6550== ERROR: AddressSanitizer: heap-use-after-free on address 0x601a0000bec0 at pc 0x4464a4 bp 0x7fffa40be910 sp 0x7fffa40be908
READ of size 1 at 0x601a0000bec0 thread T0
    #0 0x4464a3 in _thread_add_matched_message /home/todd/.apps/notmuch/lib/thread.cc:369
    #1 0x443c2c in notmuch_threads_get /home/todd/.apps/notmuch/lib/query.cc:496
    #2 0x41d947 in do_search_threads /home/todd/.apps/notmuch/notmuch-search.c:131
    #3 0x40a3fe in main /home/todd/.apps/notmuch/notmuch.c:345
    #4 0x7f4e535b4ec4 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287
    #5 0x40abe6 in _start ??:?
0x601a0000bec0 is located 96 bytes inside of 134-byte region [0x601a0000be60,0x601a0000bee6)
freed by thread T0 here:
    #0 0x7f4e54e6933a in __interceptor_free ??:?
    #1 0x7f4e54482fab in _talloc_free ??:?
previously allocated by thread T0 here:
    #0 0x7f4e54e6941a in malloc ??:?
    #1 0x7f4e54485b5d in talloc_strdup ??:?
2015-01-19 08:15:14 +01:00
..
database-private.h lib: Enable ghost messages feature 2014-10-25 19:31:27 +02:00
database.cc lib: Remove unnecessary thread linking steps when using ghost messages 2014-10-25 19:46:19 +02:00
directory.cc lib: Return an error from operations that require an upgrade 2014-08-30 11:39:41 -07:00
filenames.c lib: fix NULL checks for filenames iterators 2012-09-01 23:03:11 -03:00
gen-version-script.sh build: add canonicalize_file_name to symbols exported from libnotmuch.so 2014-04-19 05:58:34 +09:00
index.cc lib: Index name and address of from/to headers as a phrase 2014-06-18 17:55:14 -03:00
libsha1.c util: detect byte order 2013-11-27 07:43:29 -04:00
libsha1.h fix sum moar typos [comments in source code] 2011-06-23 15:58:39 -07:00
Makefile fix sum moar typos [build scripts, Makefiles] 2011-06-23 15:44:59 -07:00
Makefile.local lib: bump soname 2014-09-16 20:16:31 +02:00
message-file.c lib: drop the deprecation message for single-message mbox files 2015-01-01 16:47:47 +01:00
message.cc lib: convert two "iterator copy strings" into references. 2015-01-02 17:18:42 +01:00
messages.c lib: Eliminate _notmuch_message_list_append 2013-02-18 20:20:38 -04:00
notmuch-private.h lib: Internal support for querying and creating ghost messages 2014-10-25 19:26:54 +02:00
notmuch.h lib: bump LIBNOTMUCH_MAJOR_VERSION to 4 2014-11-06 00:10:03 +01:00
parse-time-vrp.cc lib: add date range query support 2012-10-31 16:55:32 -03:00
parse-time-vrp.h lib: add date range query support 2012-10-31 16:55:32 -03:00
query.cc lib: make notmuch_threads_valid return FALSE when passed NULL 2014-01-24 20:20:54 -04:00
sha1.c lib: Start all function names in notmuch-private.h with 2014-07-13 12:25:29 -03:00
string-list.c Fixup string list author 2011-03-21 02:45:18 -04:00
tags.c lib: fix warnings when building with clang 2012-12-01 08:10:32 -04:00
thread.cc lib: Fix use after free 2015-01-19 08:15:14 +01:00