diff options
Diffstat (limited to 'src/notes.c')
-rw-r--r-- | src/notes.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/notes.c b/src/notes.c index dd36cc2fe..87ee1e742 100644 --- a/src/notes.c +++ b/src/notes.c @@ -11,6 +11,7 @@ #include "refs.h" #include "config.h" #include "iterator.h" +#include "signature.h" static int find_subtree_in_current_level( git_tree **out, @@ -455,6 +456,10 @@ int git_note_create( git_commit *commit = NULL; git_tree *tree = NULL; + if (!git_signature__has_valid_version(author) || + !git_signature__has_valid_version(committer)) + return -1; + target = git_oid_allocfmt(oid); GITERR_CHECK_ALLOC(target); @@ -482,6 +487,10 @@ int git_note_remove(git_repository *repo, const char *notes_ref, git_commit *commit = NULL; git_tree *tree = NULL; + if (!git_signature__has_valid_version(author) || + !git_signature__has_valid_version(committer)) + return -1; + target = git_oid_allocfmt(oid); GITERR_CHECK_ALLOC(target); |