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

Unified Diff: dart/sdk/lib/io/secure_socket.dart

Issue 615923002: Fix circular ringbuffer used in socket implementation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | dart/tests/standalone/io/regress_21160_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/io/secure_socket.dart
diff --git a/dart/sdk/lib/io/secure_socket.dart b/dart/sdk/lib/io/secure_socket.dart
index 6261cf89fc27c6a5ee33475553bef1e59d0ec00c..f11355ae5a2dd5fb5c5e3213c207bbcc5eabe29f 100644
--- a/dart/sdk/lib/io/secure_socket.dart
+++ b/dart/sdk/lib/io/secure_socket.dart
@@ -1135,7 +1135,7 @@ class _ExternalBuffer {
int bytesRead = 0;
// Loop over zero, one, or two linear data ranges.
while (bytesRead < bytes) {
- int toRead = min(bytes, linearLength);
+ int toRead = min(bytes - bytesRead, linearLength);
result.setRange(bytesRead,
bytesRead + toRead,
data,
« no previous file with comments | « no previous file | dart/tests/standalone/io/regress_21160_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698