mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
pack: check pack_window_open return
This commit is contained in:
@@ -844,7 +844,10 @@ static int packfile_unpack_compressed(
|
||||
unsigned int window_len;
|
||||
unsigned char *in;
|
||||
|
||||
in = pack_window_open(p, mwindow, *position, &window_len);
|
||||
if ((in = pack_window_open(p, mwindow, *position, &window_len)) == NULL) {
|
||||
error = -1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if ((error = git_zstream_set_input(&zstream, in, window_len)) < 0 ||
|
||||
(error = git_zstream_get_output_chunk(data + total, &bytes, &zstream)) < 0) {
|
||||
|
||||
Reference in New Issue
Block a user