Skip to content

Commit

Permalink
Fix null pointer dereference in ParseCommitWithSignature (#4962)
Browse files Browse the repository at this point in the history
  • Loading branch information
SagePtr authored and lunny committed Sep 20, 2018
1 parent 8b113cd commit 043ab2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/gpg_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 043ab2c

Please sign in to comment.