mu: protect against overly long keys
We got some errors when some of the key values exceeded the Xapian maximum; in particular the message-id. So make all the key-methods check, and truncate the message-id if necessary.
This commit is contained in:
@ -397,10 +397,8 @@ mu_msg_iter_get_thread_id (MuMsgIter *iter)
|
||||
try {
|
||||
const std::string thread_id (
|
||||
iter->cursor().get_document().get_value(MU_MSG_FIELD_ID_THREAD_ID).c_str());
|
||||
|
||||
return thread_id.empty() ? NULL : g_strdup (thread_id.c_str());
|
||||
|
||||
|
||||
} MU_XAPIAN_CATCH_BLOCK_RETURN (NULL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user