Skip to content

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

Closed
ppawliczek wants to merge 1 commit intoapple:masterfrom
ppawliczek:call_cupsFileGetChar_after_eof
Closed

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

Conversation

@ppawliczek
Copy link

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
Collaborator

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
Collaborator

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants