浏览代码

LibPDF: Permit comments at the end of a stream

Kyle Pereira 1 年之前
父节点
当前提交
e4b8d68039
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Userland/Libraries/LibPDF/Parser.cpp

+ 2 - 0
Userland/Libraries/LibPDF/Parser.cpp

@@ -519,6 +519,8 @@ PDFErrorOr<Vector<Operator>> Parser::parse_operators()
 
     while (!m_reader.done()) {
         parse_comment();
+        if (m_reader.done())
+            break;
         auto ch = m_reader.peek();
         if (is_operator_char_start(ch)) {
             auto operator_start = m_reader.offset();