[asterisk-commits] file: branch 1.8 r378553 - /branches/1.8/res/res_rtp_asterisk.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jan 4 15:12:29 CST 2013
Author: file
Date: Fri Jan 4 15:12:24 2013
New Revision: 378553
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=378553
Log:
Don't pass STUN packets through the SRTP unprotect function.
(closes issue AST-1036)
Reported by: jbigelow
Modified:
branches/1.8/res/res_rtp_asterisk.c
Modified: branches/1.8/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/res/res_rtp_asterisk.c?view=diff&rev=378553&r1=378552&r2=378553
==============================================================================
--- branches/1.8/res/res_rtp_asterisk.c (original)
+++ branches/1.8/res/res_rtp_asterisk.c Fri Jan 4 15:12:24 2013
@@ -360,12 +360,13 @@
int len;
struct ast_rtp *rtp = ast_rtp_instance_get_data(instance);
struct ast_srtp *srtp = ast_rtp_instance_get_srtp(instance);
+ char *in = buf;
if ((len = ast_recvfrom(rtcp ? rtp->rtcp->s : rtp->s, buf, size, flags, sa)) < 0) {
return len;
}
- if (res_srtp && srtp && res_srtp->unprotect(srtp, buf, &len, rtcp) < 0) {
+ if ((*in > 1) && res_srtp && srtp && res_srtp->unprotect(srtp, buf, &len, rtcp) < 0) {
return -1;
}
More information about the asterisk-commits
mailing list