Fix potential for stack overflows in app_chanspy.c
authorMark Michelson <mmichelson@digium.com>
Tue, 10 Feb 2009 23:17:03 +0000 (23:17 +0000)
committerMark Michelson <mmichelson@digium.com>
Tue, 10 Feb 2009 23:17:03 +0000 (23:17 +0000)
commitc9670b24a4ed662225aee613e45fe645b3b3f343
tree10c3d46ca9369f4fb972f6f5b8948c88770d6fe6
parente909bfcea9903b60258e6d1f98791968e5232aab
Fix potential for stack overflows in app_chanspy.c

When using the 'g' or 'e' options, the stack allocations that
were used could cause a stack overflow if a spyer stayed on the
line long enough without actually successfully spying on anyone.

The problem has been corrected by using static buffers and copying
the contents of the appropriate strings into them instead of using
functions like alloca or ast_strdupa

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@174805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
apps/app_chanspy.c