[Home]

Summary:ASTERISK-13024: [patch] Asterisk crashes if udptl.conf is not available
Reporter:klaus3000 (klaus3000)Labels:
Date Opened:2008-11-06 10:42:56.000-0600Date Closed:2008-11-26 12:33:00.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/Configuration
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) udptl.c.patch
Description:Hi! If udptl.conf is not available, Asterisk crashes:

Program terminated with signal 8, Arithmetic exception.
#0  0x081443d5 in ast_udptl_new_with_bindaddr (sched=0xb7735820, io=0xb7735910, callbackmode=0, addr={s_addr = 2770372691}) at udptl.c:811
811             x = (ast_random() % (udptlend - udptlstart)) + udptlstart;

probably udptlend - udptlstart is zero, then we have a division by zero.
Comments:By: Eliel Sardanons (eliel) 2008-11-09 20:08:35.000-0600

Thanks for reporting this issue, patch uploaded, please check if this fix your issue.


(The same issue we had with rtp.c I just copied Tilghman's patch.)

By: klaus3000 (klaus3000) 2008-11-10 03:38:03.000-0600

I can not test at the moment, but the patch is trivial and looks ok.

Shouldn't the default values be documented somewhere?

By: Leif Madsen (lmadsen) 2008-11-24 15:06:21.000-0600

Hrmmm... I misread this and thought that it would just be a matter of running Asterisk without the udptl.conf file, but it seems it actually needs to be used, and I'm not exactly sure the easiest way of doing that, so I'm setting this back to Ready For Testing. Sorry for the noise.

By: Leif Madsen (lmadsen) 2008-11-24 15:24:06.000-0600

OK, I was able to reproduce this issue (thanks Zoiper!) and I confirm this patch resolves the crashing issue.

By: Digium Subversion (svnbot) 2008-11-26 12:32:59.000-0600

Repository: asterisk
Revision: 159475

U   trunk/main/udptl.c

------------------------------------------------------------------------
r159475 | tilghman | 2008-11-26 12:32:59 -0600 (Wed, 26 Nov 2008) | 7 lines

If the config file does not exist, then the first use crashes Asterisk.
(closes issue ASTERISK-13024)
Reported by: klaus3000
Patches:
      udptl.c.patch uploaded by eliel (license 64)
Tested by: blitzrage

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

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