From: Mark Michelson Date: Tue, 8 Apr 2008 19:07:38 +0000 (+0000) Subject: Fix potential buffer overflow that could happen if more than 100 announce files X-Git-Tag: 1.4.20-rc1~82 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e1e05ad198cea5261146e5bf2d2d5f1d23e54316;p=thirdparty%2Fasterisk.git Fix potential buffer overflow that could happen if more than 100 announce files were specified when calling ParkAndAnnounce. This overflow is not exploitable remotely and so there is no need for a security advisory. (closes issue #12386) Reported by: davidw git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@113507 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_parkandannounce.c b/apps/app_parkandannounce.c index b4e9006fb3..0e89c73ac0 100644 --- a/apps/app_parkandannounce.c +++ b/apps/app_parkandannounce.c @@ -211,7 +211,7 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data) tpl_working = template; tpl_current=strsep(&tpl_working, ":"); - while(tpl_current && looptemp < sizeof(tmp)) { + while(tpl_current && looptemp < ARRAY_LEN(tmp)) { tmp[looptemp]=tpl_current; looptemp++; tpl_current=strsep(&tpl_working,":");