mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
Merge pull request #7238 from kanru-contrib/null-terminate-pack-buffer
fix(pack): ensure pack_backend__read returns null terminated buffer
This commit is contained in:
@@ -941,6 +941,9 @@ static int packfile_unpack_compressed(
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* zlib may have garbled the trailing buffer */
|
||||
data[size] = '\0';
|
||||
|
||||
obj->type = type;
|
||||
obj->len = size;
|
||||
obj->data = data;
|
||||
|
||||
Reference in New Issue
Block a user