Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: panic if JSON relationship array contains null #239

Merged
merged 1 commit into from
May 20, 2024

Conversation

kzantow
Copy link
Collaborator

@kzantow kzantow commented May 8, 2024

This PR fixes a panic when invalid JSON containing null in a relationship array is parsed.

TODO:

  • add tests

Fixes: #238

Signed-off-by: Keith Zantow <kzantow@gmail.com>
@kzantow kzantow force-pushed the fix/null-relationship-panic branch from 5ed5bfa to 24bd829 Compare May 20, 2024 20:35
@kzantow kzantow marked this pull request as ready for review May 20, 2024 20:35
@kzantow kzantow merged commit 57d4b8e into spdx:main May 20, 2024
6 checks passed
@kzantow kzantow deleted the fix/null-relationship-panic branch May 20, 2024 23:38
cuixq added a commit to google/osv-scanner that referenced this pull request Jul 2, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [github.com/spdx/tools-golang](https://github.com/spdx/tools-golang)
| `v0.5.4` -> `v0.5.5` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fspdx%2ftools-golang/v0.5.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fspdx%2ftools-golang/v0.5.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fspdx%2ftools-golang/v0.5.4/v0.5.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fspdx%2ftools-golang/v0.5.4/v0.5.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>spdx/tools-golang (github.com/spdx/tools-golang)</summary>

###
[`v0.5.5`](https://github.com/spdx/tools-golang/releases/tag/v0.5.5)

[Compare
Source](https://github.com/spdx/tools-golang/compare/v0.5.4...v0.5.5)

#### What's Changed

- fix: properly normalize Windows paths, add windows test runner by
[@&#8203;kzantow](https://github.com/kzantow) in
[spdx/tools-golang#242
- fix: panic if JSON relationship array contains null by
[@&#8203;kzantow](https://github.com/kzantow) in
[spdx/tools-golang#239
- chore: provide a clearer error when using an invalid Originator by
[@&#8203;LaurentGoderre](https://github.com/LaurentGoderre) in
[spdx/tools-golang#246

#### New Contributors

- [@&#8203;LaurentGoderre](https://github.com/LaurentGoderre) made
their first contribution in
[spdx/tools-golang#246

**Full Changelog**:
spdx/tools-golang@v0.5.4...v0.5.5

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 6am on monday" in timezone
Australia/Sydney, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/google/osv-scanner).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Co-authored-by: Xueqin Cui <72771658+cuixq@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nil ptr deref panic when parsing JSON SBOM with a null relationships value
2 participants