mirror of
https://github.com/SerenityOS/serenity
synced 2024-11-05 17:46:52 +00:00
LibGfx: Make TextTagData verify input is 7-bit ASCII
TextTagData::from_bytes() errors out if that isn't the case, but let's make sure other potential future callers get it right too.
This commit is contained in:
parent
df5dbc180f
commit
eaa0e3484b
1 changed files with 2 additions and 0 deletions
|
@ -762,6 +762,8 @@ public:
|
|||
: TagData(offset, size, Type)
|
||||
, m_text(move(text))
|
||||
{
|
||||
for (u8 byte : text.bytes())
|
||||
VERIFY(byte < 128);
|
||||
}
|
||||
|
||||
// Guaranteed to be 7-bit ASCII.
|
||||
|
|
Loading…
Reference in a new issue