stream_blob_to_fd: detect errors reading from stream
authorJeff King <peff@peff.net>
Mon, 25 Mar 2013 20:16:50 +0000 (16:16 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 27 Mar 2013 20:46:47 +0000 (13:46 -0700)
We call read_istream, but never check its return value for
errors. This can lead to us looping infinitely, as we just
keep trying to write "-1" bytes (and we do not notice the
error, as we simply check that write_in_full reports the
same number of bytes we fed it, which of course is also -1).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found