-
Notifications
You must be signed in to change notification settings - Fork 164
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 uninitialized memory in ModelicaInternal_readLine, ModelicaStrings_scanIdentifier and ModelicaStrings_scanString #3092
Conversation
Why don't we wait and see whether |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Safe thing to do regardless of what the specification says or will say (the library is also backwards compatible with older versions of MSL)
Because I consider it a bug. See #3004 for a similar issue fixed recently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @sjoelund point that the library should also be compatible with external code written for older MLS versions when the terminating null wasn't granted.
Note: I was going to comment on this - seems I was too late. The most obvious solution would be to just |
Right, but in that case I would suggest to also make sure that we have test models that take these code paths, so that implementations really become aware that they must do the tedious analysis of what kind of pointer that is being returned. |
As reported by modelica/ModelicaSpecification#2403