Re: various part 2



On 2001.10.17 09:48 Ali Akcaagac wrote:
> patch 4: balsa/src/message-window.c
> 
> see yourself. it checks for some stuff and returns
> false, then checks for one stuff and returns true
> and definately returns false if not found. so i
> changed this to check only for TRUE and if its not
> found return FALSE.
> 
...
> 
> --- balsa-cvs/src/message-window.c	Wed Oct 17 13:57:43 2001
> +++ balsa/src/message-window.c	Wed Oct 17 15:34:24 2001
> @@ -826,22 +826,17 @@
>  find_url_cb(GNode *gnode, struct BalsaMRUEntry *data)
>  {
>      BalsaMailboxNode *node;
> -
> +
>      node=gnode->data;
> -    if(!node || !BALSA_IS_MAILBOX_NODE(node))
> -	return(FALSE);
> -
> -    if(!node->mailbox)
> -	return(FALSE);
> -
> +
>      if(!strcmp(LIBBALSA_MAILBOX(node->mailbox)->url, data->url)) {
...
This will segfault if either node == NULL or node->mailbox == NULL.  
That's why those conditional `return's are there.



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