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

Reads eff_dir with space in the path string #294

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tleppala
Copy link
Collaborator

Reads string with space in in. Does not work if string is longer than allocated buffer, but whole operation fails to use eff files anyway.

@tleppala tleppala self-assigned this Aug 14, 2023
@jaakkojulin
Copy link
Member

While it is true that use of efficiency files fails if efficiency directory is not read properly, it still might be worth checking after fgets() that input->eff_dir length with strlen() is shorter than EFF_DIR_LENGTH - 1 and giving a relevant error message in that case.

Also might be good idea to skip over spaces before (or after, but it is easy to cause memory issues in C if doing so) fgets().

@tleppala tleppala marked this pull request as draft September 15, 2023 05:47
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