Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(366)

Unified Diff: content/browser/renderer_host/p2p/socket_host.cc

Issue 373873002: Fixes for re-enabling more MSVC level 4 warnings: content/browser/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/p2p/socket_host.cc
diff --git a/content/browser/renderer_host/p2p/socket_host.cc b/content/browser/renderer_host/p2p/socket_host.cc
index 007ab77a2004d5e6bff632c18f7d7302486aec5d..5fc38184f819a77ba1bca54ada114b4e7c5b13bd 100644
--- a/content/browser/renderer_host/p2p/socket_host.cc
+++ b/content/browser/renderer_host/p2p/socket_host.cc
@@ -221,7 +221,8 @@ bool GetRtpPacketStartPositionAndLength(const char* packet,
int length,
int* rtp_start_pos,
int* rtp_packet_length) {
- int rtp_begin, rtp_length;
+ int rtp_begin;
+ int rtp_length = 0;
if (IsTurnChannelData(packet)) {
// Turn Channel Message header format.
// 0 1 2 3
@@ -314,7 +315,7 @@ bool GetRtpPacketStartPositionAndLength(const char* packet,
}
// Making sure we have a valid RTP packet at the end.
- if (!(rtp_length < kMinRtpHdrLen) &&
+ if ((rtp_length >= kMinRtpHdrLen) &&
IsRtpPacket(packet + rtp_begin, rtp_length) &&
ValidateRtpHeader(packet + rtp_begin, rtp_length, NULL)) {
*rtp_start_pos = rtp_begin;

Powered by Google App Engine
This is Rietveld 408576698