Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release/3.8] PDF vector stream parser: correcly parse structures like '[3 3.5] 0 d ' #9215

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion frmts/pdf/pdfreadvectors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static const PDFOperator asPDFOperators[] = {
{"cm", 6},
{"CS", 1},
{"cs", 1},
{"d", 1}, /* we have ignored the first arg */
{"d", 1}, /* we have ignored the first arg which is an array */
// d0
// d1
{"Do", 1},
Expand Down Expand Up @@ -784,6 +784,7 @@ OGRGeometry *PDFDataset::ParseContent(
else if (!bInString && nArrayLevel && ch == ']')
{
nArrayLevel--;
nTokenSize = 0; // completely ignore content in arrays
}

else if (!bInString && nTokenSize == 0 && ch == '(')
Expand Down
Loading