summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2010-06-01 19:26:42 +0100
committerAndreas Ericsson <ae@op5.se>2010-06-02 11:18:55 +0200
commit5b7487bee63e7f5cb6ea1d9090d52ae631296cd8 (patch)
tree4638c830017efa737b74da9e55236bd515ac569d /src
parent331578fb1d3ff7013b312914fa9c78ee61d8ce52 (diff)
downloadlibgit2-5b7487bee63e7f5cb6ea1d9090d52ae631296cd8.tar.gz
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>
Diffstat (limited to 'src')
-rw-r--r--src/revobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/revobject.c b/src/revobject.c
index a9e9df3b6..94eb865e6 100644
--- a/src/revobject.c
+++ b/src/revobject.c
@@ -38,7 +38,7 @@ git_revpool_table *git_revpool_table_create(unsigned int min_size)
git_revpool_table *table;
int i;
- table = git__malloc(sizeof(table));
+ table = git__malloc(sizeof(*table));
if (table == NULL)
return NULL;