Skip to content
Snippets Groups Projects
Commit e0a8fc8c authored by David Vossel's avatar David Vossel
Browse files

Merged revisions 206867 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r206867 | dvossel | 2009-07-16 16:24:16 -0500 (Thu, 16 Jul 2009) | 8 lines
  
  avoid segfault caused by user error
  
  If the CALLERPRES() dialplan function is set to nothing,
  a segfault occurs.  This is user error to begin with, but
  I'd rather see a cli warning message than have Asterisk
  crash on me.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@206868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent f8c37545
Branches
No related tags found
No related merge requests found
...@@ -1124,6 +1124,9 @@ static const struct ast_value_translation pres_types[] = { ...@@ -1124,6 +1124,9 @@ static const struct ast_value_translation pres_types[] = {
int ast_parse_caller_presentation(const char *data) int ast_parse_caller_presentation(const char *data)
{ {
int index; int index;
if (!data) {
return -1;
}
for (index = 0; index < ARRAY_LEN(pres_types); ++index) { for (index = 0; index < ARRAY_LEN(pres_types); ++index) {
if (!strcasecmp(pres_types[index].name, data)) { if (!strcasecmp(pres_types[index].name, data)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment