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

Fix issues reported by OpenScanHub #54

Merged
merged 7 commits into from
Feb 5, 2025

Conversation

zdohnal
Copy link
Member

@zdohnal zdohnal commented Feb 5, 2025

Hi,

static analyzer OpenScanHub found several issues when ran on libppd - possible buffer overflows, uninitialized memory, format string issues and resource leaks.

The Pr fixes the current important issues and passes sanity testing.

Would you mind adding them to the project?

Other parts of the code uses bigger array for the same use case, fix the
issue by matching the array size to max possible length read by
sscanf().
The array members are strings, so we can get correct number of times by
dividing the array size by char* size.

debug.c: Protect against possible format string attack

ppd-collection.cxx: Use intmax_t for printing time_t var
@zdohnal zdohnal requested a review from tillkamppeter February 5, 2025 11:40
@tillkamppeter tillkamppeter merged commit 824365e into OpenPrinting:master Feb 5, 2025
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