Commit d38b99c
Fix: nil deref bug for ruleset response (#2762)
Example panic:
Stack trace from the terraform-provider-github_v6.6.0 plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xcac607]
goroutine 4723 [running]:
github.com/integrations/terraform-provider-github/v6/github.resourceGithubRepositoryRulesetRead(0xc000b0d300, {0xd352c0?, 0xc00089ea00?})
github.com/integrations/terraform-provider-github/v6/github/resource_github_repository_ruleset.go:580 +0x567
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0x107d470?, {0x107d470?, 0xc000a40ff0?}, 0xd?, {0xd352c0?, 0xc00089ea00?})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:811 +0x15f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0003ed7a0, {0x107d470, 0xc000a40ff0}, 0xc000b1b1e0, {0xd352c0, 0xc00089ea00})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/resource.go:1117 +0x529
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc00036c678, {0x107d470?, 0xc000a40cf0?}, 0xc0006dea40)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.34.0/helper/schema/grpc_provider.go:708 +0x6c5
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc00026d900, {0x107d470?, 0xc000a404b0?}, 0xc00025c3f0)
github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/tf5server/server.go:783 +0x309
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0xee16c0, 0xc00026d900}, {0x107d470, 0xc000a404b0}, 0xc000b0ce00, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.23.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:482 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000197000, {0x107d470, 0xc000a40420}, {0x1081d68, 0xc00027c300}, 0xc0009a1200, 0xc00045aab0, 0x1719528, 0x0)
google.golang.org/grpc@v1.63.2/server.go:1369 +0xdf8
google.golang.org/grpc.(*Server).handleStream(0xc000197000, {0x1081d68, 0xc00027c300}, 0xc0009a1200)
google.golang.org/grpc@v1.63.2/server.go:1780 +0xe8b
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.63.2/server.go:1019 +0x8b
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 12
google.golang.org/grpc@v1.63.2/server.go:1030 +0x125
Error: The terraform-provider-github_v6.6.0 plugin crashed!
Co-authored-by: Nick Floyd <139819+nickfloyd@users.noreply.github.com>1 parent 8b2eac9 commit d38b99c
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
633 | 640 | | |
634 | 641 | | |
635 | 642 | | |
| |||
0 commit comments