diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-08-28 11:27:42 +0200 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-08-28 09:41:58 +0000 |
| commit | 443c11c765c0bf86d91595bf5edd50af4476fdc6 (patch) | |
| tree | 5b3c9a33404f6aee72dd9cf4de5ffd18d75c751c /syz-cluster/workflow/build-step | |
| parent | bee60a83ac500de0590dfe108da76395d821092a (diff) | |
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 )
Diffstat (limited to 'syz-cluster/workflow/build-step')
| -rw-r--r-- | syz-cluster/workflow/build-step/main.go | 10 |
1 files 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 { |
