From 443c11c765c0bf86d91595bf5edd50af4476fdc6 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Thu, 28 Aug 2025 11:27:42 +0200 Subject: 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 ) --- syz-cluster/workflow/build-step/main.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/syz-cluster/workflow/build-step/main.go b/syz-cluster/workflow/build-step/main.go index 7d260ea9c..943b18700 100644 --- a/syz-cluster/workflow/build-step/main.go +++ b/syz-cluster/workflow/build-step/main.go @@ -143,10 +143,12 @@ func reportResults(ctx context.Context, client *api.Client, Result: status, Log: output, } - if uploadReq.SeriesID != "" { - testResult.PatchedBuildID = buildID - } else { - testResult.BaseBuildID = buildID + if uploadReq != nil { + if uploadReq.SeriesID != "" { + testResult.PatchedBuildID = buildID + } else { + testResult.BaseBuildID = buildID + } } err := client.UploadTestResult(ctx, testResult) if err != nil { -- cgit mrf-deployment