mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 21:56:44 +00:00
Fix a memory corruption runtime error
On the msvc build, the tests t0401-parse and t0501-walk both crash with a runtime error (ACCESS_VIOLATION). This is caused by writing to un-allocated memory due to an under-allocation of a git_revpool_table data structure. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
This commit is contained in:
parent
331578fb1d
commit
5b7487bee6
@ -38,7 +38,7 @@ git_revpool_table *git_revpool_table_create(unsigned int min_size)
|
|||||||
git_revpool_table *table;
|
git_revpool_table *table;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
table = git__malloc(sizeof(table));
|
table = git__malloc(sizeof(*table));
|
||||||
|
|
||||||
if (table == NULL)
|
if (table == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user