]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 346762 via svnmerge from
authorAlexandr Anikin <may@telecom-service.ru>
Fri, 2 Dec 2011 16:42:32 +0000 (16:42 +0000)
committerAlexandr Anikin <may@telecom-service.ru>
Fri, 2 Dec 2011 16:42:32 +0000 (16:42 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r346762 | may | 2011-12-02 20:19:19 +0400 (Fri, 02 Dec 2011) | 7 lines

  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/10@346763 65c4cc65-6c06-0410-ace0-fbb531ad65f3

addons/chan_ooh323.c
channels/chan_h323.c

index 1592c1a4da867eb7b6cba448099c5f05cc04c7de..afe2430c4458daa44a2f676947c1e61d60578e01 100644 (file)
@@ -4576,7 +4576,7 @@ struct ast_frame *ooh323_rtp_read(struct ast_channel *ast, struct ooh323_pvt *p)
                f = &null_frame;
        }
 
-       if (p->owner && !p->faxmode && (f->frametype == AST_FRAME_VOICE)) {
+       if (f && p->owner && !p->faxmode && (f->frametype == AST_FRAME_VOICE)) {
                /* We already hold the channel lock */
                if (!(ast_format_cap_iscompatible(p->owner->nativeformats, &f->subclass.format))) {
                        ast_debug(1, "Oooh, voice format changed to %s\n", ast_getformatname(&f->subclass.format));
index 23952b7db632acc270f7b77ac49de62a6caa9e37..5f28720865108ba8048c4731b0bb8852aeaf1e47 100644 (file)
@@ -772,7 +772,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 (!ast_format_cap_iscompatible(pvt->owner->nativeformats, &f->subclass.format)) {