Skip to content
New issue

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

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

Already on GitHub? # to your account

libcontainer: fix potential panic if spec.Process is nil #1926

Merged
merged 1 commit into from
Nov 7, 2018
Merged

libcontainer: fix potential panic if spec.Process is nil #1926

merged 1 commit into from
Nov 7, 2018

Conversation

Ace-Tang
Copy link
Contributor

@Ace-Tang Ace-Tang commented Nov 6, 2018

for the code logic, pointer 'spec.Process' should be judge first
to avoid panic.

Signed-off-by: Ace-Tang aceapril@126.com

for the code logic, pointer 'spec.Process' should be judge first
to avoid panic.

Signed-off-by: Ace-Tang <aceapril@126.com>
@cyphar
Copy link
Member

cyphar commented Nov 7, 2018

Dammit, this code is so full of nil pointer derefs...

LGTM.

Approved with PullApprove

@Ace-Tang
Copy link
Contributor Author

Ace-Tang commented Nov 7, 2018

Yes, maybe a refactor is need ^ ^

@Ace-Tang
Copy link
Contributor Author

Ace-Tang commented Nov 7, 2018

I think I can add more test for CreateLibcontainerConfig, consider for many nil pointer before ^ ^

@crosbymichael
Copy link
Member

crosbymichael commented Nov 7, 2018

LGTM

Approved with PullApprove

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants