ladybird/Userland/Libraries
Nico Weber e7f7c434f7 LibPDF: Don't check for startxref after trailer dict
Several files have a comment after the trailer dict and the
`startxref` after it.

We really should add a consume_whitespace_and_comments() function
and call that in most places we currently call consume_whitespace().

But in this case, for non-linearized files, we first jump to the
end of the file, read `startxref`, then jump to `xref` from the
offset there, and then read the trailer after the `xref`,
only to read `startxref` again. So we can just not do that.

(For linearized files, we now completely ignore `startxref`.
But we don't use the data in `startxref` in linearized files
anyways, so it's fine to not read it there too.)

Reduces number of crashes on 300 random PDFs from the web (the first 300
from 0000.zip from
https://pdfa.org/new-large-scale-pdf-corpus-now-publicly-available/)
from 25 (8%) to 23 (7%).
2023-10-24 13:32:01 -04:00
..
LibArchive
LibAudio
LibC
LibCards
LibChess
LibCMake
LibCodeComprehension
LibCompress
LibConfig
LibCore
LibCoredump
LibCpp
LibCrypt
LibCrypto
LibDebug
LibDesktop
LibDeviceTree
LibDiff
LibDNS
LibDSP
LibEDID
LibELF
LibFileSystem
LibFileSystemAccessClient
LibGemini
LibGfx LibGfx/WOFF2: Reject fonts with a compressed size larger than 10MiB 2023-10-24 13:45:01 +02:00
LibGL
LibGLSL
LibGPU
LibGUI
LibHTTP
LibIDL
LibImageDecoderClient
LibIMAP
LibIPC
LibJS
LibKeyboard
LibLine
LibLocale
LibMain
LibManual
LibMarkdown
LibPartition
LibPCIDB
LibPDF LibPDF: Don't check for startxref after trailer dict 2023-10-24 13:32:01 -04:00
LibProtocol
LibRegex
LibSanitizer
LibSoftGPU
LibSQL
LibSymbolication
LibSyntax
LibSystem
LibTest
LibTextCodec
LibThreading
LibTimeZone
LibTLS
LibUnicode
LibUSBDB
LibVideo
LibVirtGPU
LibVT
LibWasm
LibWeb LibWeb: Separate "out of view" check from RecordingPainter commands 2023-10-24 18:55:12 +02:00
LibWebSocket
LibWebView LibWebView: Add a helper to get selected text with collapsed whitespace 2023-10-24 07:28:30 +02:00
LibX86
LibXML
CMakeLists.txt