]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
process null frame pointer returned by ast_rtp_instance_read correctly
authorAlexandr Anikin <may@telecom-service.ru>
Fri, 2 Dec 2011 16:19:19 +0000 (16:19 +0000)
committerAlexandr Anikin <may@telecom-service.ru>
Fri, 2 Dec 2011 16:19:19 +0000 (16:19 +0000)
(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

addons/chan_ooh323.c
channels/chan_h323.c

index 06b7a672e6c2ce96af4d25c20ab45113ab690a80..b4456c5703d542105e139a258b46f57364f87bcb 100644 (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) {
index 3f901e068aeba86298d61c749e3bb8daf6dfa785..ecf3cc1256d25b37e04ba9945bfe9ddfd3d8e3b2 100644 (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) {