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

Fallback allocation errors #402

Merged
merged 2 commits into from
Sep 3, 2021

Conversation

vathpela
Copy link
Contributor

This fixes two bugs with fallback's read_file() allocation.

xypron and others added 2 commits September 3, 2021 09:46
After calling AllocateZeroPool() we must check the returned pointer.

Fixes: 3ce517f ("Add a fallback loader for when shim is invoked as BOOTX64.EFI")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich correctly noticed that read_file()'s memory allocation failure
error path tested the wrong variable, and thus would never catch the
error condition.  The *next* error, file->Read() failing, has the same
incorrect variable usage in its FreePool() invocation.

This fixes it to free the right variable as well.

Signed-off-by: Peter Jones <pjones@redhat.com>
@frozencemetery frozencemetery merged commit cff8db7 into rhboot:main Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants