mirror of
https://github.com/go-gitea/gitea
synced 2024-12-23 00:54:28 +00:00
Fix null pointer dereference in ParseCommitWithSignature (#4962)
This commit is contained in:
parent
8b113cd8b6
commit
043ab2cd59
@ -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…
Reference in New Issue
Block a user