xmlsecurity: check file header when reading PDF signature
Currently the only non-ZIP-based import filter that declares the SUPPORTSSIGNING flag is PDF, so if we get a stream without a storage, we assume it's PDF. If any other non-ZIP-based format would add that flag in the future, that would mean PDFDocument::Read() gets that as an input. That means it makes sense to at least check the file header early in the tokenizer, and return early when that doesn't match. Change-Id: I8760d130c4211f37be705e03b22814825042cac8 Reviewed-on: https://gerrit.libreoffice.org/29888Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Showing
Please
register
or
sign in
to comment