aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-16 21:27:49 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2009-07-16 21:27:49 +0000
commitc919cd9fc5f30557b69ce18dfb53a8678570b199 (patch)
tree1942446519c8e0a131eca90bde5b712eb25c8f0c /main
parentf5166c42e14f8cd1d749dddc079e69bf099e1146 (diff)
Merged revisions 206868 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r206868 | dvossel | 2009-07-16 16:25:22 -0500 (Thu, 16 Jul 2009) | 14 lines 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/branches/1.6.0@206871 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/callerid.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/callerid.c b/main/callerid.c
index c92f84ba4..a67b1c694 100644
--- a/main/callerid.c
+++ b/main/callerid.c
@@ -1103,6 +1103,9 @@ static struct {
int ast_parse_caller_presentation(const char *data)
{
int i;
+ if (!data) {
+ return -1;
+ }
for (i = 0; i < ARRAY_LEN(pres_types); i++) {
if (!strcasecmp(pres_types[i].name, data))