From: Jeff King Date: Mon, 25 Mar 2013 20:16:50 +0000 (-0400) Subject: stream_blob_to_fd: detect errors reading from stream X-Git-Tag: v1.8.3-rc0~125^2~9 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/45d4bdae5906cfe6b7cb1ba1cec82fd80381e07e?hp=45d4bdae5906cfe6b7cb1ba1cec82fd80381e07e stream_blob_to_fd: detect errors reading from stream 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 Signed-off-by: Junio C Hamano ---