[Home]

Summary:ASTERISK-09373: chan_misdn segfaults on a reload if there are no configured MISDN ports
Reporter:Steve Davies . (stevedavies)Labels:
Date Opened:2007-05-03 07:59:20Date Closed:2007-05-18 03:28:09
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Channels/chan_misdn
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Hi,

We have a standard Asterisk build that includes the chan_misdn driver.

Where there are no connected ISDN ports we get a segfault on reload.

The crash is like so:

Core was generated by `/usr/sbin/asterisk -U asterisk -G asterisk -v -g -p -U asterisk -G asterisk'.
Program terminated with signal 11, Segmentation fault.
...
#0  _free_port_cfg () at misdn_config.c:223
223             int gn = map[MISDN_CFG_GROUPNAME];

The reason for the segfault is:
(gdb) p map
$1 = (int *) 0x0

Fix presumably is to check that there is something to free before calling free_port_cfg.


****** ADDITIONAL INFORMATION ******


I didn't attach the backtrace etc because the problem is rather obvious.

If you need it please explain and I'll upload.
Comments:By: crich (crich) 2007-05-18 03:27:56

This is already fixed in the svn 1.2 branch. I've right now tested that with an empty misdn.conf, and there was no Segfault when doing reload.