<feed xmlns='http://www.w3.org/2005/Atom'>
<title>notmuch/lib/thread.cc, branch debian/0.22-1</title>
<subtitle>thread-based email index, search, and tagging</subtitle>
<id>https://git.notmuchmail.org/git/notmuch/atom?h=debian%2F0.22-1</id>
<link rel='self' href='https://git.notmuchmail.org/git/notmuch/atom?h=debian%2F0.22-1'/>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/'/>
<updated>2015-10-05T22:53:53Z</updated>
<entry>
<title>lib: migrate thread.cc to new query_search API</title>
<updated>2015-10-05T22:53:53Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2015-09-27T15:32:02Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=378ba492a634db5b841f2454991239a897f830b2'/>
<id>urn:sha1:378ba492a634db5b841f2454991239a897f830b2</id>
<content type='text'>
here we rely on thread_id_query being attached to the local talloc
context, so no new cleanup code is needed.
</content>
</entry>
<entry>
<title>lib: note remaining uses of deprecated message search API</title>
<updated>2015-09-04T11:08:18Z</updated>
<author>
<name>David Bremner</name>
<email>david@tethera.net</email>
</author>
<published>2015-06-07T15:01:58Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=110694b00b79793b3c09a0349c0ff7608df551d6'/>
<id>urn:sha1:110694b00b79793b3c09a0349c0ff7608df551d6</id>
<content type='text'>
The two remaining cases in the lib seem to require more than a simple
replacement of the old call, with the new call plus a check of the
return value.
</content>
</entry>
<entry>
<title>lib: Fix use after free</title>
<updated>2015-01-19T07:15:14Z</updated>
<author>
<name>Todd</name>
<email>todd@electricoding.com</email>
</author>
<published>2015-01-17T15:51:46Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=ef5b4947d8eaea745764e11fe346f67ca2e4a988'/>
<id>urn:sha1:ef5b4947d8eaea745764e11fe346f67ca2e4a988</id>
<content type='text'>
_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 ??:?
</content>
</entry>
<entry>
<title>lib: Fix potential invalid read past an empty string</title>
<updated>2015-01-19T07:15:05Z</updated>
<author>
<name>Todd</name>
<email>todd@electricoding.com</email>
</author>
<published>2015-01-17T15:51:45Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=0fc788460276f0e08c3ccae0a779f96125624a8d'/>
<id>urn:sha1:0fc788460276f0e08c3ccae0a779f96125624a8d</id>
<content type='text'>
==22884== ERROR: AddressSanitizer: heap-buffer-overflow on address 0x601600008291 at pc 0x7ff6295680e5 bp 0x7fff4ab9aa40 sp 0x7fff4ab9aa08
READ of size 1 at 0x601600008291 thread T0
    #0 0x7ff6295680e4 in __interceptor_strcmp ??:?
    #1 0x44763b in _thread_add_message /home/todd/.apps/notmuch/lib/thread.cc:255
    #2 0x4459e8 in notmuch_threads_get /home/todd/.apps/notmuch/lib/query.cc:496
    #3 0x41e2a7 in do_search_threads /home/todd/.apps/notmuch/notmuch-search.c:131
    #4 0x40a408 in main /home/todd/.apps/notmuch/notmuch.c:345
    #5 0x7ff627cb9ec4 in __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:287
    #6 0x40abf3 in _start ??:?
0x601600008291 is located 0 bytes to the right of 97-byte region [0x601600008230,0x601600008291)
allocated by thread T0 here:
    #0 0x7ff62956e41a in malloc ??:?
    #1 0x7ff628b8ab5d in talloc_strdup ??:?
</content>
</entry>
<entry>
<title>thread.cc: Avoid empty thread names if possible.</title>
<updated>2015-01-17T12:48:26Z</updated>
<author>
<name>Jesse Rosenthal</name>
<email>jrosenthal@jhu.edu</email>
</author>
<published>2014-10-29T20:51:43Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=67e368ac7ba84b0ea70356c2bdb3a14018009294'/>
<id>urn:sha1:67e368ac7ba84b0ea70356c2bdb3a14018009294</id>
<content type='text'>
Currently the thread is named based on either the oldest or newest
matching message (depending on the search order). If this message has
an empty subject, though, the thread will show up with an empty
subject in the search results. (See the thread starting with
`id:1412371140-21051-1-git-send-email-david@tethera.net` for an
example.)

This changes the behavior so it will use a non-empty name for the
thread if possible. We name threads based on (a) non-empty matches for
the query, and (b) the search order. If the search order is
oldest-first (as in the default inbox) it chooses the oldest matching
non-empty message as the subject. If the search order is newest-first
it chooses the newest one.
</content>
</entry>
<entry>
<title>lib: Use email address instead of empty real name.</title>
<updated>2014-12-07T12:36:08Z</updated>
<author>
<name>Jesse Rosenthal</name>
<email>jrosenthal@jhu.edu</email>
</author>
<published>2014-11-22T13:17:16Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=4135a1f8dae02e712ff172ae38f68b74f9721236'/>
<id>urn:sha1:4135a1f8dae02e712ff172ae38f68b74f9721236</id>
<content type='text'>
Currently, if a From-header is of the form:

    "" &lt;address@example.com&gt;

the empty string will be treated as a valid real-name, and the entry
in the search results will be empty.

The new behavior here is that we treat an empty real-name field as if
it were null, so that the email address will be used in the search
results instead.

Signed-off-by: Jesse Rosenthal &lt;jrosenthal@jhu.edu&gt;
</content>
</entry>
<entry>
<title>lib: Start all function names in notmuch-private.h with</title>
<updated>2014-07-13T15:25:29Z</updated>
<author>
<name>Charles Celerier</name>
<email>cceleri@cs.stanford.edu</email>
</author>
<published>2014-05-13T09:44:05Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=df8885f62c13f77b2b16cbb211e3a727945870b0'/>
<id>urn:sha1:df8885f62c13f77b2b16cbb211e3a727945870b0</id>
<content type='text'>
As noted in devel/STYLE, every private library function should start
with _notmuch. This patch corrects function naming that did not adhere
to this style in lib/notmuch-private.h. In particular, the old function
names that now begin with _notmuch are

    notmuch_sha1_of_file
    notmuch_sha1_of_string
    notmuch_message_file_close
    notmuch_message_file_get_header
    notmuch_message_file_open
    notmuch_message_get_author
    notmuch_message_set_author

Signed-off-by: Charles Celerier &lt;cceleri@cs.stanford.edu&gt;
</content>
</entry>
<entry>
<title>lib: fix clang compiler warning</title>
<updated>2014-01-18T18:39:51Z</updated>
<author>
<name>Jani Nikula</name>
<email>jani@nikula.org</email>
</author>
<published>2014-01-17T16:21:05Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=f94834407b0af52856b7db4be48c45ae0cf59936'/>
<id>urn:sha1:f94834407b0af52856b7db4be48c45ae0cf59936</id>
<content type='text'>
With some combination of clang and talloc, not using the return value
of talloc_steal() produces a warning. Ignore it, as talloc_steal() has
no failure modes per documentation.
</content>
</entry>
<entry>
<title>lib: add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t</title>
<updated>2013-06-25T05:53:16Z</updated>
<author>
<name>Mark Walters</name>
<email>markwalters1009@gmail.com</email>
</author>
<published>2013-05-13T15:10:51Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=d29d7e1ee25059c657412d5b045650f1e3e1533f'/>
<id>urn:sha1:d29d7e1ee25059c657412d5b045650f1e3e1533f</id>
<content type='text'>
Add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t so that it can
cover all four values of search --exclude in the cli.

Previously the way to avoid any message being marked excluded was to
pass in an empty list of excluded tags: since we now have an explicit
option we might as well honour it.

The enum is in a slightly strange order as the existing FALSE/TRUE
options correspond to the new
NOTMUCH_EXCLUDE_FLAG/NOTMUCH_EXCLUDE_TRUE options so this means we do
not need to bump the version number.

Indeed, an example of this is that the cli count and show still use
FALSE/TRUE and still work.
</content>
</entry>
<entry>
<title>lib: add --exclude=all option</title>
<updated>2013-05-14T00:32:03Z</updated>
<author>
<name>Mark Walters</name>
<email>markwalters1009@gmail.com</email>
</author>
<published>2013-05-11T19:50:02Z</published>
<link rel='alternate' type='text/html' href='https://git.notmuchmail.org/git/notmuch/commit/?id=38698d86596af64fa25c118dafef0249155ca7a4'/>
<id>urn:sha1:38698d86596af64fa25c118dafef0249155ca7a4</id>
<content type='text'>
Adds a exclude all option to the lib which means that excluded
messages are completely ignored (as if they had actually been
deleted).
</content>
</entry>
</feed>
