-
Notifications
You must be signed in to change notification settings - Fork 84
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
replaced getline with fscanf #1136 #1137
Conversation
@JayHuLBL This is not save against buffer overflow. Look into using |
@mwetter It's ready for review. |
@mwetter It has been updated to avoid memory leakage. The model |
@JayHuLBL Please also make sure that the failing tests work again. |
Close this PR as it will be addressed in #1138. |
The alternative of
getline()
function include functionfscanf()
andfgets()
. However, both of them requires to specify the object with length, to store the result:fscanf()
is used here since it is relatively safe to specify the maximum length of the first section (before first empty space) of each line.