浏览代码

Fix null pointer dereference in ParseCommitWithSignature (#4962)

tags/v1.6.0-dev
SagePtr 5 年前
父节点
当前提交
043ab2cd59
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      models/gpg_key.go

+ 1
- 1
models/gpg_key.go 查看文件

@@ -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

正在加载...
取消
保存