Skip to content

Commit ad95873

Browse files
committed
mailmap: Undefined or garbage value returned to caller
In case there was nothing to parse in the buf, we'd return uninitialized stack data.
1 parent aa8cb58 commit ad95873

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mailmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ int git_mailmap_add_entry(
225225

226226
static int mailmap_add_buffer(git_mailmap *mm, const char *buf, size_t len)
227227
{
228-
int error;
228+
int error = 0;
229229
git_parse_ctx ctx;
230230

231231
/* Scratch buffers containing the real parsed names & emails */

0 commit comments

Comments
 (0)