[
https://issues.apache.org/jira/browse/PDFBOX-6324?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18147639#comment-18147639
]
ASF subversion and git services commented on PDFBOX-6324:
---------------------------------------------------------
Commit 1940495 from Tilman Hausherr in branch 'pdfbox/trunk'
[ https://svn.apache.org/r1940495 ]
PDFBOX-6324: add test by Claude Sonnet 5.5
> Bug in CFFParser.concatenateMatrix()
> ------------------------------------
>
> Key: PDFBOX-6324
> URL: https://issues.apache.org/jira/browse/PDFBOX-6324
> Project: PDFBox
> Issue Type: Sub-task
> Components: FontBox
> Affects Versions: 2.0.37, 3.0.8 PDFBox
> Reporter: Tilman Hausherr
> Assignee: Tilman Hausherr
> Priority: Trivial
> Fix For: 2.0.38, 3.0.9 PDFBox, 4.0.0
>
>
> From Claude (the bug in the PR was reported by ChatGPT/Codex):
> h3. Bug: wrong operand in the {{b}} component (line 736)
>
> java
> {{matrixDest.set(1, a1 * b2 + b1 * d1); // wrong
> matrixDest.set(1, a1 * b2 + b1 * d2); // correct}}
> For the row-vector product {{{}M1 × M2{}}}, {{{}b = a1·b2 + b1·d2{}}}. The
> code uses {{d1}} instead of {{{}d2{}}}, while the neighbouring line 738
> ({{{}c1*b2 + d1*d2{}}}) correctly uses {{{}d2{}}}.
> This is latent: nearly all real FontMatrices are {{{}[0.001 0 0 0.001 0
> 0]{}}}, so {{b1 == 0}} and the wrong term vanishes. It only produces wrong
> output when the top-dict matrix has a non-zero {{b}} (skewed or rotated
> fonts) and the two matrices’ {{d}} values differ.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]