Commit 5ba7c4cb by Vicent Martí

Merged pull request #143 from nordsturm/fix_loop.

Fix going into infinite loop in read_header_loose()
parents 1d008781 a3ced637
...@@ -434,6 +434,9 @@ static int read_header_loose(git_rawobj *out, const char *loc) ...@@ -434,6 +434,9 @@ static int read_header_loose(git_rawobj *out, const char *loc)
if ((read_bytes = read(fd, raw_buffer, sizeof(raw_buffer))) > 0) { if ((read_bytes = read(fd, raw_buffer, sizeof(raw_buffer))) > 0) {
set_stream_input(&zs, raw_buffer, read_bytes); set_stream_input(&zs, raw_buffer, read_bytes);
z_return = inflate(&zs, 0); z_return = inflate(&zs, 0);
} else {
z_return = Z_STREAM_END;
break;
} }
} while (z_return == Z_OK); } while (z_return == Z_OK);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment