mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
LibPDF: Don't use unsanitized values in error messages
Previously, constructing error messages with unsanitized input could fail because error message strings must be UTF-8.
This commit is contained in:
parent
f8bf9c6506
commit
b4296e1c9b
9 changed files with 41 additions and 15 deletions
|
@ -101,7 +101,8 @@ PDFErrorOr<Value> Parser::parse_value(CanBeIndirectValue can_be_indirect_value)
|
|||
if (m_reader.matches('['))
|
||||
return TRY(parse_array());
|
||||
|
||||
return error(DeprecatedString::formatted("Unexpected char \"{}\"", m_reader.peek()));
|
||||
dbgln_if(PDF_DEBUG, "Unexpected char \"{}\"", m_reader.peek());
|
||||
return error("Unexpected character");
|
||||
}
|
||||
|
||||
PDFErrorOr<Value> Parser::parse_possible_indirect_value_or_ref()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue