Skip to content

Commit

Permalink
Fix nil pointer dereference to git ScanOptions (#1603)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcastorina authored Aug 3, 2023
1 parent d062834 commit e322c4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/sources/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ func (s *Source) Init(aCtx context.Context, name string, jobId, sourceId int64,
s.sourceId = sourceId
s.jobId = jobId
s.verify = verify
if s.scanOptions == nil {
s.scanOptions = &ScanOptions{}
}

var conn sourcespb.Git
if err := anypb.UnmarshalTo(connection, &conn, proto.UnmarshalOptions{}); err != nil {
Expand Down

0 comments on commit e322c4b

Please sign in to comment.