You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Michael Klink (Jira)" <ji...@apache.org> on 2021/02/22 13:46:00 UTC

[jira] [Comment Edited] (PDFBOX-5104) ArrayIndexOutOfBoundsException in isOwnerPassword

    [ https://issues.apache.org/jira/browse/PDFBOX-5104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17288383#comment-17288383 ] 

Michael Klink edited comment on PDFBOX-5104 at 2/22/21, 1:45 PM:
-----------------------------------------------------------------

Adobe Reader also displays an error dialog when opening the PDF and displays only an empty page and broken comments.

Looking at the PDF the cross references are mostly incorrect, the table position is incorrect, ... that PDF is broken.

Probably one could replace the {{ArrayIndexOutOfBoundsException}} by a {{BrokenPdfException}}.


was (Author: mkl):
Adobe Reader also displays an error dialog when opening the PDF and displays only an empty page and broken comments.

Probably one could replace the \{{ArrayIndexOutOfBoundsException}} by a \{{BrokenPdfException}}.

> ArrayIndexOutOfBoundsException in isOwnerPassword
> -------------------------------------------------
>
>                 Key: PDFBOX-5104
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-5104
>             Project: PDFBox
>          Issue Type: Bug
>            Reporter: Fabian Meumertzheim
>            Priority: Major
>         Attachments: crash-220e4aa98d4bf26be7d9949391263d480a4c9cc1.pdf
>
>
> The attached PDF generates the following stack trace when loaded via Loader.loadPDF (using current Git revision [877fe27feaa36e7d24119b053ef41c4247f0691d|https://github.com/apache/pdfbox/commit/877fe27feaa36e7d24119b053ef41c4247f0691d]):
> java.lang.ArrayIndexOutOfBoundsException: arraycopy: last source index 32 out of bounds for byte[14]
> 	at java.base/java.lang.System.arraycopy(Native Method)
> 	at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.isOwnerPassword(StandardSecurityHandler.java:566)
> 	at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.prepareForDecryption(StandardSecurityHandler.java:191)
> 	at org.apache.pdfbox.pdfparser.COSParser.prepareDecryption(COSParser.java:2522)
> 	at org.apache.pdfbox.pdfparser.COSParser.rebuildTrailer(COSParser.java:1885)
> 	at org.apache.pdfbox.pdfparser.COSParser.retrieveTrailer(COSParser.java:263)
> 	at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:127)
> 	at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:180)
> 	at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:154)
> 	at org.apache.pdfbox.Loader.loadPDF(Loader.java:204)
> 	at com.example.PdfBoxFuzzer.fuzzerTestOneInput(PdfBoxFuzzer.java:31)
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org