[Home]

Summary:ASTERISK-04303: [patch] suggestd check on arguments to ast_add_extension*()
Reporter:Luigi Rizzo (rizzo)Labels:
Date Opened:2005-05-30 15:15:09Date Closed:2008-01-15 15:36:53.000-0600
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) pbx.diff
Description:ast_add_extension2() does not check that the datad function pointer
is non-null, and dereferences it in many places.

Given that it can be useful to have a no-op as data destructor (e.g.
when the argument is a constant string), and that NULL is an excellent
way to specify a no-op, I suggest the attached patch which, if
called with datad = NULL, replaces it with a pointer to a no-op
function.

Comments:By: Kevin P. Fleming (kpfleming) 2005-06-02 22:18:14

Committed to CVS HEAD, thanks!

By: Digium Subversion (svnbot) 2008-01-15 15:36:53.000-0600

Repository: asterisk
Revision: 5824

U   trunk/pbx.c

------------------------------------------------------------------------
r5824 | kpfleming | 2008-01-15 15:36:53 -0600 (Tue, 15 Jan 2008) | 2 lines

allow ast_add_extension2 to accept a NULL destructor (bug ASTERISK-4303)

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

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