Skip to content

Commit 443c11c

Browse files
committed
syz-cluster: fix a possible nil ptr deref
Fix the following error: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x16e3c5e] at main.reportResults ( /syz-cluster/workflow/build-step/main.go:146 ) at main.main ( /syz-cluster/workflow/build-step/main.go:84 )
1 parent bee60a8 commit 443c11c

File tree

1 file changed

+6
-4
lines changed
  • syz-cluster/workflow/build-step

1 file changed

+6
-4
lines changed

syz-cluster/workflow/build-step/main.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,12 @@ func reportResults(ctx context.Context, client *api.Client,
143143
Result: status,
144144
Log: output,
145145
}
146-
if uploadReq.SeriesID != "" {
147-
testResult.PatchedBuildID = buildID
148-
} else {
149-
testResult.BaseBuildID = buildID
146+
if uploadReq != nil {
147+
if uploadReq.SeriesID != "" {
148+
testResult.PatchedBuildID = buildID
149+
} else {
150+
testResult.BaseBuildID = buildID
151+
}
150152
}
151153
err := client.UploadTestResult(ctx, testResult)
152154
if err != nil {

0 commit comments

Comments
 (0)