Skip to content

Fix wrong variable in findXmp XMP trailer search loop (backport #9284)#9316

Merged
kmilos merged 1 commit into
0.28.xfrom
mergify/bp/0.28.x/pr-9284
Jun 15, 2026
Merged

Fix wrong variable in findXmp XMP trailer search loop (backport #9284)#9316
kmilos merged 1 commit into
0.28.xfrom
mergify/bp/0.28.x/pr-9284

Conversation

@mergify

@mergify mergify Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

Fix #9283:

Line 182 checks data[xmpPos] instead of data[trailerPos]. The variable xmpPos is constant at this point, so the early-exit condition is never true. The loop checks every byte position against all XMP trailer patterns unnecessarily.

Use data[trailerPos] to restore the intended early-exit behavior.


This is an automatic backport of pull request #9284 done by Mergify.

Line 182 checks data[xmpPos] instead of data[trailerPos]. The
variable xmpPos is constant at this point, so the early-exit
condition is never true. The loop checks every byte position
against all XMP trailer patterns unnecessarily.

Use data[trailerPos] to restore the intended early-exit behavior.

(cherry picked from commit c754877)
@kmilos kmilos merged commit a805902 into 0.28.x Jun 15, 2026
84 of 87 checks passed
@kmilos kmilos deleted the mergify/bp/0.28.x/pr-9284 branch June 15, 2026 10:30
@kmilos kmilos added this to the v0.28.9 milestone Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants