Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

PPD parser: Calling cupsFileGetChar(...) after EOF#5473

Closed
ppawliczek wants to merge 1 commit into
apple:masterfrom
ppawliczek:call_cupsFileGetChar_after_eof
Closed

PPD parser: Calling cupsFileGetChar(...) after EOF#5473
ppawliczek wants to merge 1 commit into
apple:masterfrom
ppawliczek:call_cupsFileGetChar_after_eof

Conversation

@ppawliczek

Copy link
Copy Markdown

For some input data the function cupsFileGetChar(...) was incorrectly called
from the function ppd_read(...) after returning EOF in a previous call. This
causes incorrect state of cups_file and results in memory leak.

For some input data the function cupsFileGetChar(...) was incorrectly called
from the function ppd_read(...) after returning EOF in a previous call. This
causes incorrect state of cups_file and results in memory leak.
@michaelrsweet

Copy link
Copy Markdown
Contributor

That's not the right place to add this check. I've committed a change to the cupsFileGetChar and cupsFileRead functions to immediately return EOF rather than calling cups_fill.

[master 96fee30] Protect against continuing to read from a file at EOF (Issue #5473)

@michaelrsweet

Copy link
Copy Markdown
Contributor

[branch-2.2 18518f3] Protect against continuing to read from a file at EOF (Issue #5473)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants