]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Don't overflow when paging more than 128 extensions
authorTerry Wilson <twilson@digium.com>
Wed, 14 Jan 2009 01:27:18 +0000 (01:27 +0000)
committerTerry Wilson <twilson@digium.com>
Wed, 14 Jan 2009 01:27:18 +0000 (01:27 +0000)
commitb3ea95331318a58c15283de5023791172be8df58
tree7f3c5144853dfd5e0a7cc9bebe12b3d44827f328
parent9161b7fc87e1d915da17fd15530d87761276af39
Don't overflow when paging more than 128 extensions

The number of available slots for calls in app_page was hardcoded to 128.
Proper bounds checking was not in place to enforce this limit, so if more than
128 extensions were passed to the Page() app, Asterisk would crash.  This patch
instead dynamically allocates memory for the ast_dial structures and removes
the (non-functional) arbitrary limit.

This issue would have special importance to anyone who is dynamically creating
the argument passed to the Page application and allowing more than 128
extensions to be added by an outside user via some external interface.

The patch posted by a_villacis was slightly modified for some coding guidelines
and other cleanups.  Thanks, a_villacis!
(closes issue #14217)
Reported by: a_villacis
Patches:
      20080912-asterisk-app_page-fix-buffer-overflow.patch uploaded by a (license 660)
Tested by: otherwiseguy

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@168593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_page.c