The filter istream pulls data from an "upstream" stream,
running it through a filter function. However, we did not
properly notice when the upstream filter yielded an error,
and just returned what we had read. Instead, we should
propagate the error.

Signed-off-by: Jeff King <>
I don't know if we should be preserving fs->i_end from getting a
negative value. I would think the internal state of the istream after an
error is undefined.

 streaming.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/streaming.c b/streaming.c
index f4126a7..f4ab12b 100644
--- a/streaming.c
+++ b/streaming.c
@@ -237,7 +237,7 @@ static read_method_decl(filtered)
                if (!fs->input_finished) {
                        fs->i_end = read_istream(fs->upstream, fs->ibuf, 
                        if (fs->i_end < 0)
-                               break;
+                               return -1;
                        if (fs->i_end)

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to