[asterisk-dev] [Code Review] 4044: sorcery: Prevent segfault in sorcery_wizard_create when there's no create virtual function

George Joseph reviewboard at asterisk.org
Fri Oct 3 10:54:05 CDT 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4044/
-----------------------------------------------------------

(Updated Oct. 3, 2014, 10:54 a.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 424447


Repository: Asterisk


Description
-------

When you call ast_sorcery_create() you don't necessarily know which wizard is going to be invoked.  If it happens to be a wizard like 'config' that doesn't have a 'create' virtual function you get a segfault in the sorcery_wizard_create callback.  This patch catches the null function pointer, does an ast_assert, and logs an error.


Diffs
-----

  branches/12/main/sorcery.c 424332 

Diff: https://reviewboard.asterisk.org/r/4044/diff/


Testing
-------


Thanks,

George Joseph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141003/ce911a5f/attachment.html>


More information about the asterisk-dev mailing list