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

Unified Diff: net/websockets/websocket.cc

Issue 293055: Fix calculation of length in websocket.cc. (Closed)
Patch Set: Created 11 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket.cc
diff --git a/net/websockets/websocket.cc b/net/websockets/websocket.cc
index 4fa0bfdee64f754ff90f42d8a9745d917c30cc0f..9b2b142886ba4ac6d2fd2377fca292858a5370da 100644
--- a/net/websockets/websocket.cc
+++ b/net/websockets/websocket.cc
@@ -380,7 +380,7 @@ void WebSocket::ProcessFrameData() {
socket_stream_->Close();
return;
}
- length = length * 128 + *p & 0x7f;
+ length = length * 128 + (*p & 0x7f);
++p;
}
// Checks if the frame body hasn't been completely received yet.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698