mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 18:51:48 +02:00
Fix null pointer dereference in ParseCommitWithSignature (#4964)
This commit is contained in:
1 parent
4176e33148
commit
93dcc6caef
1 file changed
+1
-1
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user