fix for SRTP bug reported by christophe

* prevents buffer overflow on big messages
* sdp parse buffer size increased to 2048 (necessaary?)



git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@212 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 20 years ago
parent cd1752047b
commit 5880452190

@ -34,6 +34,7 @@
#include "AmCmd.h"
#include "AmUtils.h"
#include "AmPlugIn.h"
#include "AmSession.h"
#include "amci/amci.h"
#include "log.h"
@ -139,7 +140,10 @@ AmSdp::AmSdp(const AmSdp& p_sdp_msg)
void AmSdp::setBody(const char* _sdp_msg)
{
strcpy(r_buf,_sdp_msg);
if (!memchr(_sdp_msg, '\0', BUFFER_SIZE)) {
throw AmSession::Exception(513, "Message too big");
}
strcpy(r_buf, _sdp_msg);
}

@ -44,7 +44,7 @@ using std::vector;
*/
/** Scratch buffer size. */
#define BUFFER_SIZE 1024
#define BUFFER_SIZE 2048
/** network type */
enum NetworkType { NT_OTHER=0, NT_IN };

Loading…
Cancel
Save