Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
341a258b
Commit
341a258b
authored
7 years ago
by
Jenkins2
Committed by
Gerrit Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "pbx: Prevent execution of NULL pointer."
parents
634d30fb
cfb88f3a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main/pbx.c
+7
-5
7 additions, 5 deletions
main/pbx.c
with
7 additions
and
5 deletions
main/pbx.c
+
7
−
5
View file @
341a258b
...
...
@@ -2863,7 +2863,6 @@ static int pbx_extension_helper(struct ast_channel *c, struct ast_context *con,
struct
ast_exten
*
e
;
struct
ast_app
*
app
;
char
*
substitute
=
NULL
;
int
res
;
struct
pbx_find_info
q
=
{
.
stacklen
=
0
};
/* the rest is reset in pbx_find_extension */
char
passdata
[
EXT_DATA_SIZE
];
int
matching_action
=
(
action
==
E_MATCH
||
action
==
E_CANMATCH
||
action
==
E_MATCHMORE
);
...
...
@@ -2880,9 +2879,12 @@ static int pbx_extension_helper(struct ast_channel *c, struct ast_context *con,
ast_unlock_contexts
();
return
-
1
;
/* success, we found it */
}
else
if
(
action
==
E_FINDLABEL
)
{
/* map the label to a priority */
res
=
e
->
priority
;
int
res
=
e
->
priority
;
ast_unlock_contexts
();
return
res
;
/* the priority we were looking for */
/* the priority we were looking for */
return
res
;
}
else
{
/* spawn */
if
(
!
e
->
cached_app
)
e
->
cached_app
=
pbx_findapp
(
e
->
app
);
...
...
@@ -2932,7 +2934,7 @@ static int pbx_extension_helper(struct ast_channel *c, struct ast_context *con,
}
else
{
if
(
!
q
.
swo
->
exec
)
{
ast_log
(
LOG_WARNING
,
"No execution engine for switch %s
\n
"
,
q
.
swo
->
name
);
re
s
=
-
1
;
re
turn
-
1
;
}
return
q
.
swo
->
exec
(
c
,
q
.
foundcontext
?
q
.
foundcontext
:
context
,
exten
,
priority
,
callerid
,
q
.
data
);
}
...
...
@@ -8922,7 +8924,7 @@ int ast_pbx_init(void)
/* This is protected by the context_and_merge lock */
autohints
=
ao2_container_alloc_options
(
AO2_ALLOC_OPT_LOCK_NOLOCK
,
HASH_EXTENHINT_SIZE
,
autohint_hash_cb
,
autohint_cmp
);
if
(
hint
device
s
)
{
if
(
auto
hints
)
{
ao2_container_register
(
"autohints"
,
autohints
,
print_autohint_key
);
}
statecbs
=
ao2_container_alloc
(
1
,
NULL
,
statecbs_cmp
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment