]> git.notmuchmail.org Git - notmuch/commit
lib: clamp return value of g_mime_utils_header_decode_date to >=0
authorDavid Bremner <david@tethera.net>
Sun, 12 Mar 2017 12:51:01 +0000 (09:51 -0300)
committerDavid Bremner <david@tethera.net>
Thu, 16 Mar 2017 00:58:25 +0000 (21:58 -0300)
commit62822a4e2dee695c486383f0fe3d90edafae24db
treee05a8837ae72e4f4ea57a8a9928af31b695136f9
parent8e7812d8243ed06fb4b2ff8f97598dbd1c139e0c
lib: clamp return value of g_mime_utils_header_decode_date to >=0

For reasons not completely understood at this time, gmime (as of
2.6.22) is returning a date before 1900 on bad date input. Since this
confuses some other software, we clamp such dates to 0,
i.e. 1970-01-01.
lib/message.cc
test/T660-bad-date.sh