Explorar el Código

LibPDF: Permit comments at the end of a stream

Kyle Pereira hace 1 año
padre
commit
e4b8d68039
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  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();