From: Russell Bryant Date: Thu, 30 Sep 2010 15:39:45 +0000 (+0000) Subject: Merged revisions 289425 via svnmerge from X-Git-Tag: 1.8.0-rc3~4^2~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=37ad96f6823145169241f65987ae65b04db89ffb;p=thirdparty%2Fasterisk.git Merged revisions 289425 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r289425 | russell | 2010-09-30 10:37:29 -0500 (Thu, 30 Sep 2010) | 15 lines Merged revisions 289424 via svnmerge from 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.8@289426 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_sms.c b/apps/app_sms.c index aee2fa6c5a..b5c471b8ee 100644 --- a/apps/app_sms.c +++ b/apps/app_sms.c @@ -2040,6 +2040,12 @@ static int sms_exec(struct ast_channel *chan, const char *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);