aboutsummaryrefslogtreecommitdiffstats
path: root/main/callerid.c
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-16 21:25:22 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-16 21:25:22 +0000
commit86cd5db2fec6aee6a5fd35a35f552654fc406d6d (patch)
tree1d3dfc8a8f880d5a5d070737e191c9351ad5a8fc /main/callerid.c
parent44d46d056f900f3947112cccdc36d16de86365e2 (diff)
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: http://svn.digium.com/svn/asterisk/trunk@206868 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/callerid.c')
-rw-r--r--main/callerid.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/callerid.c b/main/callerid.c
index 57119958a..0f2110c3f 100644
--- a/main/callerid.c
+++ b/main/callerid.c
@@ -1124,6 +1124,9 @@ static const struct ast_value_translation pres_types[] = {
int ast_parse_caller_presentation(const char *data)
{
int index;
+ if (!data) {
+ return -1;
+ }
for (index = 0; index < ARRAY_LEN(pres_types); ++index) {
if (!strcasecmp(pres_types[index].name, data)) {