[OpenSER-Devel] [ openser-Bugs-1869566 ] [dialog] MI-command dlg_list fails on empty list

SourceForge.net noreply at sourceforge.net
Tue Jan 29 07:34:38 UTC 2008


Bugs item #1869566, was opened at 2008-01-11 17:50
Message generated for change (Comment added) made by carstenbock
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1869566&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver 1.3.x
>Status: Closed
>Resolution: Invalid
Priority: 7
Private: No
Submitted By: Carsten Bock (carstenbock)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: [dialog] MI-command dlg_list fails on empty list

Initial Comment:
Hi,

i found an tiny bug in MI-command "dlg_list" of the dialog module: It crashes OpenSER, if the list is empty. Attached patch fixes the issue.
Although the attached patch looks huge, it's mainly because of indentation. Actually, the only change is that i added the following line:

if (d_table->entries[i].first) {

The first dialog is empty (null) if the list is empty.
On our systems, the crash only appeared when creating debian-packages (for sarge), but not when compiled "by hand".

Carsten

----------------------------------------------------------------------

>Comment By: Carsten Bock (carstenbock)
Date: 2008-01-29 07:34

Message:
Logged In: YES 
user_id=1488991
Originator: YES

Hi,

sorry, no update on this. From the source, i totally agree....
I've closed this ticket.

Carsten

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-01-28 14:24

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Carsten,

Any update on this? otherwise I will close the report as invalid.

Regards,
Bogdan

----------------------------------------------------------------------

Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-01-16 09:45

Message:
Logged In: YES 
user_id=1275325
Originator: NO

Hi Carsten,

Looking at the patch, I fail to see what brings more. Because the
condition you added:
    if (d_table->entries[i].first) {
is also tested by the existing "for" loop:
    for( dlg=d_table->entries[i].first ; dlg ; dlg=dlg->next )

If d_table->entries[i].first, it will never get into the for loop (as dlg
will be NULL).

So basically your patch duplicates an exiting condition - quite strange
how it solves the problem.

When crashing, do you get a core file? can you take a look at the
backtrace?

Thanks and regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1869566&group_id=139143



More information about the Devel mailing list