Commit 6ba6c5f6 authored by binji@chromium.org's avatar binji@chromium.org

[NaCl SDK] Fix off-by-one bug in http-mount.

Cached reads would return -1 when reading at the end of the file (instead of 0).

BUG=none
TBR=sbc@chromium.org
NOTRY=true


Review URL: https://chromiumcodereview.appspot.com/12379091

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186236 0039d316-1c4b-4281-b951-d872f2087c98
parent bb7a8802
......@@ -418,7 +418,7 @@ int MountNodeHttp::DownloadToCache() {
}
int MountNodeHttp::ReadPartialFromCache(size_t offs, void* buf, size_t count) {
if (offs >= cached_data_.size()) {
if (offs > cached_data_.size()) {
errno = EINVAL;
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment