Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[v2] Fix panic in ExtractIntoStructPtr #3287

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

Merged
merged 1 commit into from
Feb 3, 2025
Merged

[v2] Fix panic in ExtractIntoStructPtr #3287

merged 1 commit into from
Feb 3, 2025

Conversation

gophercloud-backport-bot[bot]
Copy link

Backport: #2873

Passing nil as an argument to 'ExtractIntoStructPtr' causes "panic: runtime error: invalid memory address or nil pointer dereference". This is an invalid argument and should be corrected to return an error. For reference, standard package functions such as 'json.Unmarshal' return an error instead of panic.

Fixes #2872

Passing nil as an argument to 'ExtractIntoStructPtr' or
'ExtractIntoSlicePtr' causes "panic: runtime error:
invalid memory address or nil pointer dereference".
This is an invalid argument and should be corrected to
return an error. For reference, standard package functions
such as 'json.Unmarshal' return an error instead of panic.

Signed-off-by: Nobuhiro MIKI <nob@bobuhiro11.net>
Co-authored-by: pýrus <kayrus@users.noreply.github.com>
@github-actions github-actions bot added v2 This PR targets v2 edit:gophercloud This PR updates common Gophercloud code labels Jan 30, 2025
@github-actions github-actions bot added the semver:patch No API change label Jan 30, 2025
@coveralls
Copy link

Coverage Status

coverage: 78.735% (+0.05%) from 78.689%
when pulling c101370 on bp-v2-571d3f5
into 776ad36 on v2.

@mandre mandre merged commit ae26b50 into v2 Feb 3, 2025
19 checks passed
@mandre mandre deleted the bp-v2-571d3f5 branch February 3, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
edit:gophercloud This PR updates common Gophercloud code semver:patch No API change v2 This PR targets v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.