diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-10-29 20:37:48 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-10-29 20:37:48 +0100 |
commit | fd74bd0842ed332e7a4f3e59e3238592540f157c (patch) | |
tree | 884328f12a5a98bc5dd063785bd2bd7efb6fed5e /src/refdb_fs.c | |
parent | 1b4449b40d1a69026311a45d2e3534b1d2cb66a9 (diff) | |
parent | 335c9e2f45b75e9fe8d8256e6ecfdb3d333fcbcc (diff) | |
download | libgit2-fd74bd0842ed332e7a4f3e59e3238592540f157c.tar.gz |
Merge pull request #3486 from srajko/reflog-segfault-fix
Fix segfault when reading reflog with extra newlines
Diffstat (limited to 'src/refdb_fs.c')
-rw-r--r-- | src/refdb_fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/refdb_fs.c b/src/refdb_fs.c index af96821df..6d8c76236 100644 --- a/src/refdb_fs.c +++ b/src/refdb_fs.c @@ -1464,7 +1464,7 @@ static int reflog_parse(git_reflog *log, const char *buf, size_t buf_size) entry = git__calloc(1, sizeof(git_reflog_entry)); GITERR_CHECK_ALLOC(entry); - entry->committer = git__malloc(sizeof(git_signature)); + entry->committer = git__calloc(1, sizeof(git_signature)); GITERR_CHECK_ALLOC(entry->committer); if (git_oid_fromstrn(&entry->oid_old, buf, GIT_OID_HEXSZ) < 0) |