mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 07:38:10 +00:00
LibELF: Use StringBuilders instead of Strings for the interpreter path
This is required for the Kernel's usage of LibELF, since Strings do not expose allocation failure.
This commit is contained in:
parent
fb3e46e930
commit
3e959618c3
8 changed files with 36 additions and 18 deletions
|
@ -126,7 +126,14 @@ bool Image::parse()
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!validate_program_headers(header(), m_size, m_buffer, m_size, nullptr, m_verbose_logging)) {
|
||||
auto result_or_error = validate_program_headers(header(), m_size, m_buffer, m_size, nullptr, m_verbose_logging);
|
||||
if (result_or_error.is_error()) {
|
||||
if (m_verbose_logging)
|
||||
dbgln("ELF::Image::parse(): Failed validating ELF Program Headers");
|
||||
m_valid = false;
|
||||
return false;
|
||||
}
|
||||
if (!result_or_error.value()) {
|
||||
if (m_verbose_logging)
|
||||
dbgln("ELF::Image::parse(): ELF Program Headers not valid");
|
||||
m_valid = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue