Fix null pointer dereference in ParseCommitWithSignature (#4964)

This commit is contained in:
SagePtr 2018-09-20 21:09:01 +02:00 committed by Lauris BH
parent 4176e33148
commit 93dcc6caef
1 changed files with 1 additions and 1 deletions

View File

@ -360,7 +360,7 @@ func verifySign(s *packet.Signature, h hash.Hash, k *GPGKey) error {
// ParseCommitWithSignature check if signature is good against keystore.
func ParseCommitWithSignature(c *git.Commit) *CommitVerification {
if c.Signature != nil {
if c.Signature != nil && c.Committer != nil {
//Parsing signature
sig, err := extractSignature(c.Signature.Signature)
if err != nil { //Skipping failed to extract sign