[Asterisk-code-review] Fix unsafe uses of ast context pointers. (asterisk[11])

Corey Farrell asteriskteam at digium.com
Mon Jun 1 23:09:59 CDT 2015


Hello Richard Mudgett, Matt Jordan,

I'd like you to reexamine a change.  Please visit

    https://gerrit.asterisk.org/481

to look at the new patch set (#2).

Change subject: Fix unsafe uses of ast_context pointers.
......................................................................

Fix unsafe uses of ast_context pointers.

Although ast_context_find, ast_context_find_or_create and
ast_context_destroy perform locking of the contexts table,
any context pointer can become invalid at any time that the
contexts table is unlocked. This change adds locking around
all complete operations involving these functions.

Places where ast_context_find was followed by ast_context_destroy
have been replaced with calls ast_context_destroy_by_name.

ASTERISK-25094 #close
Reported by: Corey Farrell

Change-Id: I1866b6787730c9c4f3f836b6133ffe9c820734fa
---
M apps/app_meetme.c
M channels/chan_iax2.c
M channels/chan_sip.c
M channels/chan_skinny.c
M include/asterisk/pbx.h
M main/features.c
M main/pbx.c
M pbx/pbx_config.c
M tests/test_gosub.c
M tests/test_pbx.c
10 files changed, 86 insertions(+), 65 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/81/481/2
-- 
To view, visit https://gerrit.asterisk.org/481
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1866b6787730c9c4f3f836b6133ffe9c820734fa
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list