process null frame pointer returned by ast_rtp_instance_read correctly

(closes issue ASTERISK-16697)
Reported by: under
Patches: 
        segfault.diff (License #5871) patch uploaded by under


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@346762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Alexandr Anikin
2011-12-02 16:19:19 +00:00
parent c70441c168
commit 7e7e263652
2 changed files with 2 additions and 2 deletions

View File

@@ -4286,7 +4286,7 @@ struct ast_frame *ooh323_rtp_read(struct ast_channel *ast, struct ooh323_pvt *p)
f = &null_frame;
}
if (p->owner) {
if (f && p->owner) {
/* We already hold the channel lock */
if (f->frametype == AST_FRAME_VOICE && !p->faxmode) {
if (f->subclass.codec != p->owner->nativeformats) {

View File

@@ -764,7 +764,7 @@ static struct ast_frame *oh323_rtp_read(struct oh323_pvt *pvt)
if (f && (f->frametype == AST_FRAME_DTMF) && !(pvt->options.dtmfmode & (H323_DTMF_RFC2833 | H323_DTMF_CISCO))) {
return &ast_null_frame;
}
if (pvt->owner) {
if (f && pvt->owner) {
/* We already hold the channel lock */
if (f->frametype == AST_FRAME_VOICE) {
if (f->subclass.codec != pvt->owner->nativeformats) {