diff options
Diffstat (limited to 'chrome/browser/resource_dispatcher_host.cc')
-rw-r--r-- | chrome/browser/resource_dispatcher_host.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/resource_dispatcher_host.cc b/chrome/browser/resource_dispatcher_host.cc index ae3ef20..adcda4c 100644 --- a/chrome/browser/resource_dispatcher_host.cc +++ b/chrome/browser/resource_dispatcher_host.cc @@ -1062,10 +1062,10 @@ bool ResourceDispatcherHost::BufferedEventHandler::CompleteResponseStarted( if (bytes_read_) { // a Read has already occurred and we need to copy the data into the // DownloadEventHandler. - char *buf; - int buf_len; + char *buf = NULL; + int buf_len = 0; download_handler->OnWillRead(request_id, &buf, &buf_len, bytes_read_); - DCHECK(buf_len >= bytes_read_); + CHECK((buf_len >= bytes_read_) && (bytes_read_ >= 0)); memcpy(buf, read_buffer_, bytes_read_); } // Update the renderer with the response headers which will cause it to |