Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

Fix possible nil pointer derefence in fs_util.go#1813

Merged
imjasonh merged 1 commit intoGoogleContainerTools:masterfrom
slrz:pkg-util-fix-nilptr-deref
Dec 23, 2021
Merged

Fix possible nil pointer derefence in fs_util.go#1813
imjasonh merged 1 commit intoGoogleContainerTools:masterfrom
slrz:pkg-util-fix-nilptr-deref

Conversation

@slrz
Copy link
Copy Markdown
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
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes CLA signed by all commit authors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants