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 possible nil pointer derefence in fs_util.go #1813

Merged

Conversation

slrz
Copy link
Contributor

@slrz slrz commented Nov 6, 2021

When os.Stat returns an error different from ErrNotExist,
mkdirAllWithPermissions may panic with a nil pointer
derefence due to insufficient error checking.

Avoid the panic by bailing out, returning the error to the
caller.

When os.Stat returns an error different from ErrNotExist,
mkdirAllWithPermissions may panic with a nil pointer
derefence due to insufficient error checking.

Avoid the panic by bailing out, returning the error to the
caller.
@google-cla google-cla bot added the cla: yes CLA signed by all commit authors label Nov 6, 2021
@cmoulliard
Copy link

Is this PR the same as #1677 ?

@imjasonh imjasonh merged commit ac1a703 into GoogleContainerTools:master Dec 23, 2021
gcalmettes pushed a commit to gcalmettes/kaniko that referenced this pull request Dec 24, 2021
…s#1813)

When os.Stat returns an error different from ErrNotExist,
mkdirAllWithPermissions may panic with a nil pointer
derefence due to insufficient error checking.

Avoid the panic by bailing out, returning the error to the
caller.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes CLA signed by all commit authors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants