[Home]

Summary:ASTERISK-04371: [patch] Modify chan_iax2.c to use ast_strdupa correctly
Reporter:James Golovich (jamesgolovich)Labels:
Date Opened:2005-06-07 21:45:11Date Closed:2008-01-15 15:37:51.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) asterisk-iaxstrdupa.patch.txt
Description:I'm not sure why this hasn't hit other people yet, maybe my libc or gcc version, but chan_iax2 would seg when making an outbound call.

A little digging brought me to the warning about alloca from the libc docs:

Do not use alloca inside the arguments of a function call--you will get unpredictable results, because the stack space for the alloca would appear on the stack in the middle of the space for the function arguments. An example of what to avoid is foo (x, alloca (4), y).


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

Disclaimer on file
Comments:By: Kevin P. Fleming (kpfleming) 2005-06-09 16:53:47

Committed to CVS HEAD, thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:37:51.000-0600

Repository: asterisk
Revision: 5887

U   trunk/channels/chan_iax2.c

------------------------------------------------------------------------
r5887 | kpfleming | 2008-01-15 15:37:51 -0600 (Tue, 15 Jan 2008) | 2 lines

don't call alloca() or alloca()-using functions in parameter lists (bug ASTERISK-4371)

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

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