Browse Source

Fix null pointer dereference in ParseCommitWithSignature (#4962)

tags/v1.6.0-dev
SagePtr 5 years ago
parent
commit
043ab2cd59
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      models/gpg_key.go

+ 1
- 1
models/gpg_key.go 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

Loading…
Cancel
Save