Fix a crash occurring as a result of excess stack usage.

This fix involves moving the allocation of some temporary codec structures to the heap and also reduces the number of maximum payloads to something more sane for both regular and low memory builds.

(closes issue ASTERISK-20140)
Reported by: jonnt


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2012-07-18 11:38:05 +00:00
parent 9278b5e51e
commit cbdb2dbb0e
2 changed files with 35 additions and 21 deletions

View File

@@ -76,7 +76,11 @@ extern "C" {
#include "asterisk/res_srtp.h"
/* Maximum number of payloads supported */
#define AST_RTP_MAX_PT 256
#if defined(LOW_MEMORY)
#define AST_RTP_MAX_PT 128
#else
#define AST_RTP_MAX_PT 196
#endif
/* Maximum number of generations */
#define AST_RED_MAX_GENERATION 5