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

Check filename before coping to initialLogFileName #1302

Merged
merged 2 commits into from
Feb 9, 2023

Conversation

Marsman1996
Copy link
Contributor

Fix #1301.

@egli egli added this to the 3.25 milestone Feb 9, 2023
@egli egli added bug Bug in the code (not in a table) memory error Buffer overflow, use after free, memory leak, ... labels Feb 9, 2023
Copy link
Member

@egli egli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Marsman1996

Looks good except for the magic number. Can you put the 256 into a constant or a define and then use it in the declaration of initialLogFileName and in the if stamement?

Thanks

@Marsman1996
Copy link
Contributor Author

Replace the magic number with a define FILENAMESIZE.

Copy link
Member

@egli egli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent. Thank you very much

@egli egli added the needs news Update to NEWS file needed label Feb 9, 2023
@egli egli merged commit 21a2ee7 into liblouis:master Feb 9, 2023
@egli egli removed the needs news Update to NEWS file needed label Feb 24, 2023
@Marsman1996 Marsman1996 deleted the issue_1301 branch March 1, 2023 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug in the code (not in a table) memory error Buffer overflow, use after free, memory leak, ...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

global-buffer-overflow in lou_logFile() when long filename is given
3 participants