[Home]

Summary:ASTERISK-02530: chan_mgcp crashes * CVS-HEAD-09/29/04
Reporter:Andrey S Pankov (casper)Labels:
Date Opened:2004-10-05 06:06:42Date Closed:2008-01-15 15:09:15.000-0600
Priority:CriticalRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) mgcpsegfix.txt
Description:#0  0x4002acb2 in pthread_mutex_lock () from /lib/i686/libpthread.so.0
#1  0x0805fadb in ast_softhangup (chan=0x0, cause=0) at channel.c:671
#2  0x422f4f5d in handle_request (sub=0x8132748, req=0x424fc60c, sin=0x0) at chan_mgcp.c:2882
#3  0x422f20b1 in mgcpsock_read (id=0x45f03698, fd=27, events=1, ignore=0x0) at chan_mgcp.c:3215
#4  0x08052340 in ast_io_wait (ioc=0x8123bb0, howlong=0) at io.c:267
ASTERISK-1  0x422f053b in do_monitor (data=0x0) at chan_mgcp.c:3300
ASTERISK-2  0x4002a9b1 in pthread_start_thread () from /lib/i686/libpthread.so.0
Comments:By: Andrey S Pankov (casper) 2004-10-05 06:17:11

tmp_sub->owner / sub->owner messed?

By: Andrey S Pankov (casper) 2004-10-05 12:18:33

I'm *really* surprised why-why-why there are no checks for NULL pointers in e.g. ast_softhangup() & Co. :(

I.M.O., "if (p) core_func(p);" is not a right way. I'd prefer "if (core_func(p))..." and then "if (!p) return -1;" implemented in core_func itself.

Thank you.

P.S. Every suggestion made here above is "Public domain". Use at your own risk... ;)

By: Mark Spencer (markster) 2004-10-05 16:59:39

Fixed in CVS head.  It's just a typo, and the reason that it's not checked in the function is for performance.

By: Russell Bryant (russell) 2004-10-05 17:56:40

fixed in the 1.0 branch

By: Digium Subversion (svnbot) 2008-01-15 15:09:14.000-0600

Repository: asterisk
Revision: 3916

U   trunk/channels/chan_mgcp.c

------------------------------------------------------------------------
r3916 | markster | 2008-01-15 15:09:14 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix MGCP seg (bug ASTERISK-2530)

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

http://svn.digium.com/view/asterisk?view=rev&revision=3916

By: Digium Subversion (svnbot) 2008-01-15 15:09:15.000-0600

Repository: asterisk
Revision: 3917

U   branches/v1-0/channels/chan_mgcp.c

------------------------------------------------------------------------
r3917 | russell | 2008-01-15 15:09:14 -0600 (Tue, 15 Jan 2008) | 2 lines

fix chan_mgcp seg fault (bug ASTERISK-2530)

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

http://svn.digium.com/view/asterisk?view=rev&revision=3917