]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 289424 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Thu, 30 Sep 2010 15:37:29 +0000 (15:37 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 30 Sep 2010 15:37:29 +0000 (15:37 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r289424 | russell | 2010-09-30 10:34:29 -0500 (Thu, 30 Sep 2010) | 8 lines

  Fix a crash in app_sms.

  Since the data being passed to the generator callback is on the stack of the
  SMS() application, we must ensure that the generator is stopped before the
  application exits.

  ABE-2587
........

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.2@289425 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_sms.c

index bbf014065842886d416ffd70bfae9b3fe7300a74..3d79bf65f35a98a2e60fe3966a5d44ad259aa86c 100644 (file)
@@ -2039,6 +2039,12 @@ static int sms_exec(struct ast_channel *chan, void *data)
        }
        res = h.err;                            /* XXX */
 
+       /* 
+        * The SMS generator data is on the stack.  We _MUST_ make sure the generator
+        * is stopped before returning from this function.
+        */
+       ast_deactivate_generator(chan);
+
        sms_log(&h, '?');                       /* log incomplete message */
 done:
        return (res);