Fix some (rarely) possible dereferences of NULL
camel/camel-folder-thread.c:sort_node_cb() contains:
ptime1 = g_hash_table_lookup (times_cache, a1);
if (!ptime1 && a1->message) { … }
ptime2 = g_hash_table_lookup (times_cache, b1);
if (!ptime2 && b1->message) { … }
if (*ptime1 != *ptime2) return *ptime1 < *ptime2 ? -1 : 1;
In the way the code is written means, that it is possible for g_hash_table_lookup() to return once or twice NULL
, while at the same time a1->message or b1->message are also NULL.
When ptime1/ptime2 is NULL
, calling *ptime1/*ptime2 is invalid.