+Notmuch 0.29.3 (2019-11-27)
+===========================
+
+General
+-------
+
+Fix for use-after-free in notmuch_config_list_{key,val}.
+
+Fix for double close of file in notmuch-dump.
+
+Debian
+------
+
+Drop python2 support from shipped debian packaging.
+
Notmuch 0.29.2 (2019-10-19)
===========================
+notmuch (0.29.3-1) unstable; urgency=medium
+
+ * New upstream bugfix release.
+ - fix use-after-free bug in libnotmuch
+ - fix double close of file in "notmuch dump"
+
+ -- David Bremner <bremner@debian.org> Wed, 27 Nov 2019 08:19:57 -0400
+
notmuch (0.29.2-2) experimental; urgency=medium
* Drop python-notmuch binary package.
return true;
}
+static inline char * _key_from_iterator (notmuch_config_list_t *list) {
+ return talloc_strdup (list, (*list->iterator).c_str () + CONFIG_PREFIX.length ());
+}
+
const char *
notmuch_config_list_key (notmuch_config_list_t *list)
{
if (list->current_key)
talloc_free (list->current_key);
- list->current_key = talloc_strdup (list, (*list->iterator).c_str () + CONFIG_PREFIX.length ());
+ list->current_key = _key_from_iterator (list);
return list->current_key;
}
{
std::string strval;
notmuch_status_t status;
- const char *key = notmuch_config_list_key (list);
+ char *key = _key_from_iterator (list);
/* TODO: better error reporting?? */
status = _metadata_value (list->notmuch, key, strval);
talloc_free (list->current_val);
list->current_val = talloc_strdup (list, strval.c_str ());
+ talloc_free (key);
return list->current_val;
}