Re: implementation of message threadings.



Hi there,

  |On Tue, 7 Nov 2000 14:55:45 +0200
  |Gediminas Paulauskas <menesis@delfi.lt> wrote:
  |
  |However, on some mailboxes I encountered a crash. Debugging in gdb, I
  |have tracked that a SIGSEGV is got in gen_container function from
  |balsa-index-threading.c file, gdb writes this:
  |
  |Program received signal SIGSEGV, Segmentation fault.
  |0x40486b38 in g_str_hash () from /usr/lib/libglib-1.2.so.0

I have received many requests for a patch to fix a bug reported by 
Gediminas Paulauskas and its size is not so large, I will post it to this list.

--- balsa-1.0.pre5.threading/src/balsa-index-threading.c	Sun Nov  5 15:42:38 2000
+++ balsa-1.0.pre5.threading-1/src/balsa-index-threading.c	Wed Nov  8 07:17:24 2000
@@ -159,8 +159,14 @@
 	      GHashTable *id_table){
   LibBalsaMessage* message=MESSAGE(node);
 
-  GNode* container=g_hash_table_lookup(id_table, message->message_id);
+  GNode* container=NULL;
   GNode* parent=NULL;
+
+  if(!message->message_id){
+    return;
+  }
+
+  container=g_hash_table_lookup(id_table, message->message_id);
 
   if(container!=NULL){
     container->data=message;




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]