mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:07:36 +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
|
@ -27,7 +27,8 @@ PDFErrorOr<ColorSpaceFamily> ColorSpaceFamily::get(DeprecatedFlyString const& fa
|
|||
}
|
||||
ENUMERATE_COLOR_SPACE_FAMILIES(ENUMERATE)
|
||||
#undef ENUMERATE
|
||||
return Error(Error::Type::MalformedPDF, DeprecatedString::formatted("Unknown ColorSpace family {}", family_name));
|
||||
dbgln_if(PDF_DEBUG, "Unknown ColorSpace family: {}", family_name);
|
||||
return Error(Error::Type::MalformedPDF, "Unknown ColorSpace family"_string);
|
||||
}
|
||||
|
||||
PDFErrorOr<NonnullRefPtr<ColorSpace>> ColorSpace::create(DeprecatedFlyString const& name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue