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 a potential segfault in podman search #2651

Merged
merged 1 commit into from
Apr 3, 2019

Conversation

mheon
Copy link
Member

@mheon mheon commented Mar 14, 2019

When generating headers for search, we unconditionally access element 0 of an array, and I saw this segfault in our CI. There's no reason we have to do this, we're just going through it to get field names with reflect, so just make a new copy of the struct in question.

Also, move this code, which is only for CLI display, into cmd/podman from libpod/image.

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mheon

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

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M labels Mar 14, 2019
@mheon mheon force-pushed the prevent_null_deref branch from e4d3450 to 9f14ec5 Compare March 14, 2019 17:35
@baude
Copy link
Member

baude commented Mar 14, 2019

@mheon i also have this correction in my multilog PR. #2620

@rhatdan
Copy link
Member

rhatdan commented Mar 15, 2019

bot, retest this please

@mheon mheon force-pushed the prevent_null_deref branch from 9f14ec5 to 60aed1f Compare March 15, 2019 14:56
@rh-atomic-bot
Copy link
Collaborator

☔ The latest upstream changes (presumably #2620) made this pull request unmergeable. Please resolve the merge conflicts.

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 18, 2019
@rhatdan
Copy link
Member

rhatdan commented Mar 18, 2019

@mheon Needs a rebase.

@mheon mheon force-pushed the prevent_null_deref branch from 60aed1f to e944def Compare March 28, 2019 00:07
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 28, 2019
@mheon
Copy link
Member Author

mheon commented Mar 28, 2019

Rebased, should be good to merge now

@rhatdan
Copy link
Member

rhatdan commented Mar 28, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 28, 2019
@rhatdan
Copy link
Member

rhatdan commented Apr 3, 2019

/retest

@rhatdan
Copy link
Member

rhatdan commented Apr 3, 2019

@mheon This might need a new rebase?

@mheon mheon force-pushed the prevent_null_deref branch from e944def to 328b2ac Compare April 3, 2019 18:17
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 3, 2019
@mheon
Copy link
Member Author

mheon commented Apr 3, 2019

Rebased again

@rhatdan
Copy link
Member

rhatdan commented Apr 3, 2019

Seems to be failing on search.

When generating headers for search, we unconditionally
access element 0 of an array, and I saw this segfault in our CI.
There's no reason we have to do this, we're just going through it
to get field names with reflect, so just make a new copy of the
struct in question.

Also, move this code, which is only for CLI display, into
cmd/podman from libpod/image.

Signed-off-by: Matthew Heon <mheon@redhat.com>
@mheon mheon force-pushed the prevent_null_deref branch from 328b2ac to c625553 Compare April 3, 2019 19:11
@mheon
Copy link
Member Author

mheon commented Apr 3, 2019

Alright, let's see... This ought to fix it

@mheon
Copy link
Member Author

mheon commented Apr 3, 2019

Yep, tests good

@rhatdan
Copy link
Member

rhatdan commented Apr 3, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 3, 2019
@openshift-merge-robot openshift-merge-robot merged commit 7a2bca5 into containers:master Apr 3, 2019
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants