mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 02:28:12 +00:00
LibPDF: Parser::parse_header() return false if remaining bytes is zero
This commit is contained in:
parent
92fdae178b
commit
6ccfa3e75e
1 changed files with 2 additions and 0 deletions
|
@ -91,6 +91,8 @@ bool Parser::parse_header()
|
|||
{
|
||||
// FIXME: Do something with the version?
|
||||
m_reader.set_reading_forwards();
|
||||
if (m_reader.remaining() == 0)
|
||||
return false;
|
||||
m_reader.move_to(0);
|
||||
if (m_reader.remaining() < 8 || !m_reader.matches("%PDF-"))
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue