summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-06 16:49:51 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-06 16:49:51 +0000
commite0bb61938b9d8a296c2a62d2dd36725c005a30fd (patch)
tree14d799ed35791ac69747cebbf2e34ab38b8bc875 /net/base
parent181542fa4565273aac30f7f0ea9c4459ac9bcb02 (diff)
downloadchromium_src-e0bb61938b9d8a296c2a62d2dd36725c005a30fd.zip
chromium_src-e0bb61938b9d8a296c2a62d2dd36725c005a30fd.tar.gz
chromium_src-e0bb61938b9d8a296c2a62d2dd36725c005a30fd.tar.bz2
Make new FtpNetworkTransaction handle short reads correctly.
The problem was that some functions were parsing response lines, but without checking that they have the entire line available. This change will also make it easier to handle multi-line greeting (230 welcome messages). I plan to do that afterwards. TEST=Covered by net_unittests. http://crbug.com/15259 Review URL: http://codereview.chromium.org/149043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19954 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r--net/base/io_buffer.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/base/io_buffer.cc b/net/base/io_buffer.cc
index db2bffb..eb7094b 100644
--- a/net/base/io_buffer.cc
+++ b/net/base/io_buffer.cc
@@ -13,7 +13,7 @@ IOBuffer::IOBuffer(int buffer_size) {
data_ = new char[buffer_size];
}
void ReusedIOBuffer::SetOffset(int offset) {
- DCHECK(offset > 0 && offset < size_);
+ DCHECK(offset >= 0 && offset < size_);
data_ = base_->data() + offset;
}