-
Notifications
You must be signed in to change notification settings - Fork 185
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
CFE-4254: Allow inheriting attributes using global variables in bodies having local parameters #5324
Conversation
|
||
for (int iteration = 0; iteration < 10; iteration++) | ||
{ | ||
bool replacement_made = false; | ||
int var_start = -1; | ||
char closing_brace = 0; | ||
for (int c = 0; c < buffer_from[c]; c++) |
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.
If I'm not missing something this does not make sense and risks stopping too early (if the input is long and its size reaches values near 0-9/a-z ascii values).
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.
Yeah, WTH was it meant to do...?
e3a223e
to
ec6708e
Compare
@cf-bottom may I have a build in Jenkins please :) |
Sure, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/9858/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-9858/ |
Thanks for your contribution @amousset 🚀 Could you please add the following meta data to the end of the commit message using the
This would help us keep track of changes when updating change logs in upcoming releases. Additionally you can add a |
ec6708e
to
48d1896
Compare
in bodies having local parameters. This also prevents a memory corruption when an attribute contains external vars but no local vars. Ticket: CFE-4254 Changelog: Bodies can now inherit attributes containing global variables Signed-off-by: Alexis Mousset <[email protected]>
48d1896
to
a99a1cc
Compare
Thanks 🚀 Let's hope for green CI 🤞 |
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.
ACK
|
||
for (int iteration = 0; iteration < 10; iteration++) | ||
{ | ||
bool replacement_made = false; | ||
int var_start = -1; | ||
char closing_brace = 0; | ||
for (int c = 0; c < buffer_from[c]; c++) |
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.
Yeah, WTH was it meant to do...?
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.
Awesome, thanks 🚀
This also prevents a memory corruption when an inherited attribute contains external vars but no local vars.
https://northerntech.atlassian.net/browse/CFE-4254