Re: [PATCH] lib/message.cc: fix Coverity finding (use after free)
Tomi Ollilawrites: > - const char *data; > > - data = message->doc.get_data ().c_str (); > + std::string datastr = message->doc.get_data (); > + const char *data = datastr.c_str (); > Pushed, d ___ notmuch
[PATCH] lib/message.cc: fix Coverity finding (use after free)
The object where pointer to `data` was received was deleted before it was used in _notmuch_string_list_append(). Relevant Coverity messages follow: 3: extract Assigning: data = std::__cxx11::string(message->doc.()).c_str(), which extracts wrapped state from temporary of type