Index: net/base/file_stream_context_posix.cc |
diff --git a/net/base/file_stream_context_posix.cc b/net/base/file_stream_context_posix.cc |
index 44f59b1ef3b82c9b3032edcbef331901dbc4e518..268fe92e942074acf653cf25efbe74f53fd84b2d 100644 |
--- a/net/base/file_stream_context_posix.cc |
+++ b/net/base/file_stream_context_posix.cc |
@@ -103,6 +103,8 @@ FileStream::Context::IOResult FileStream::Context::ReadFileImpl( |
FileStream::Context::IOResult FileStream::Context::WriteFileImpl( |
scoped_refptr<IOBuffer> buf, |
int buf_len) { |
+ if (buf_len == 0) |
jsbell
2015/02/24 18:37:36
Can you explain why we need this special case? Doe
cmumford
2015/02/24 22:40:52
buf refers to a NULL IOBuffer in this case. So ope
jsbell
2015/02/25 00:10:30
Although you took a different approach, it is weir
|
+ return IOResult(0, 0); |
int res = file_.WriteAtCurrentPosNoBestEffort(buf->data(), buf_len); |
if (res == -1) |
return IOResult::FromOSError(errno); |