Commit 8149f850 by Patrick Steinhardt Committed by GitHub

Merge pull request #4306 from libgit2/cmn/tag-bad-signature

signature: don't leave a dangling pointer to the strings on parse failure
parents c4c95bf4 d1dbb3ae
......@@ -231,6 +231,7 @@ int git_signature__parse(git_signature *sig, const char **buffer_out,
if (git__strtol64(&sig->when.time, time_start, &time_end, 10) < 0) {
git__free(sig->name);
git__free(sig->email);
sig->name = sig->email = NULL;
return signature_error("invalid Unix timestamp");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment