Skip to content
Snippets Groups Projects
Commit f3f6587f authored by Boris Grozev's avatar Boris Grozev
Browse files

Fix bug in RTCP packet length computation.

parent 4e7a5785
No related branches found
No related tags found
No related merge requests found
...@@ -61,9 +61,10 @@ private static boolean isRTCP(RawPacket pkt) ...@@ -61,9 +61,10 @@ private static boolean isRTCP(RawPacket pkt)
if (v == RTCPHeader.VERSION) if (v == RTCPHeader.VERSION)
{ {
int length = (buf[off + 2] << 8) + (buf[off + 3] << 0); int lengthInWords = (buf[off + 2] << 8) + (buf[off + 3] << 0);
int lengthInBytes = (lengthInWords + 1) * 4;
if (length <= len) if (lengthInBytes <= len)
b = true; b = true;
} }
} }
......
...@@ -101,7 +101,7 @@ public SecurityEventManager(ZrtpControlImpl zrtpControl) ...@@ -101,7 +101,7 @@ public SecurityEventManager(ZrtpControlImpl zrtpControl)
/** /**
* Set the type of this session. * Set the type of this session.
* *
* @param type the <tt>MediaType</tt> of this session * @param sessionType the <tt>MediaType</tt> of this session
*/ */
public void setSessionType(MediaType sessionType) public void setSessionType(MediaType sessionType)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment