Skip to content
This repository has been archived by the owner on Jun 19, 2022. It is now read-only.

Check if spec.retry is nil before dereferencing it. #2052

Merged

Conversation

Harwayne
Copy link
Contributor

@Harwayne Harwayne commented Jan 7, 2021

Fixes #2051

Proposed Changes

  • Check if spec.retry is nil before dereferencing it.

Release Note

- 🐛 Fixed a potential nil pointer dereference when using a GCP Broker.

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Harwayne

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-cla google-cla bot added the cla: yes (override cla status due to multiple authors bug) label Jan 7, 2021
@tommyreddad
Copy link
Contributor

/assign

@knative-metrics-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-google-knative-gcp-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/reconciler/trigger/trigger.go 67.1% 67.8% 0.7

@tommyreddad
Copy link
Contributor

Thanks for fixing this!!!

/lgtm

@knative-prow-robot knative-prow-robot merged commit 68320b0 into google:master Jan 7, 2021
@Harwayne Harwayne deleted the nil-pointer-delivery-retry branch January 7, 2021 23:05
tommyreddad pushed a commit to tommyreddad/knative-gcp that referenced this pull request Feb 12, 2021
tommyreddad pushed a commit to tommyreddad/knative-gcp that referenced this pull request Feb 12, 2021
knative-prow-robot pushed a commit that referenced this pull request Feb 12, 2021
…g it. (#2052) (#2146)

* Check if spec.retry is nil before dereferencing it. (#2052)

* remove accidentally added test

Co-authored-by: Adam Harwayne <harwayne@google.com>
knative-prow-robot pushed a commit that referenced this pull request Feb 16, 2021
Co-authored-by: Adam Harwayne <harwayne@google.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved cla: yes (override cla status due to multiple authors bug) lgtm size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broker's spec.delivery.retry being nil causes nil pointer derefrence
4 participants