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

Unified Diff: net/base/gzip_filter.cc

Issue 53074: Make sure filters can handle an empty input buffer... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | « net/base/bzip2_filter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/gzip_filter.cc
===================================================================
--- net/base/gzip_filter.cc (revision 12272)
+++ net/base/gzip_filter.cc (working copy)
@@ -197,8 +197,10 @@
if (!dest_buffer || !dest_len || *dest_len <= 0) // output
return Filter::FILTER_ERROR;
- if (!next_stream_data_ || stream_data_len_ <= 0) // input
- return Filter::FILTER_ERROR;
+ if (!next_stream_data_ || stream_data_len_ <= 0) { // input
+ *dest_len = 0;
+ return Filter::FILTER_NEED_MORE_DATA;
+ }
// Fill in zlib control block
zlib_stream_.get()->next_in = bit_cast<Bytef*>(next_stream_data_);
« no previous file with comments | « net/base/bzip2_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698