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

HPCC-16981 Ensure StringAttr::set is safe when called with *this #9547

Merged
merged 1 commit into from Feb 1, 2017

Conversation

ghalliday
Copy link
Member

Signed-off-by: Gavin Halliday gavin.halliday@lexisnexis.com

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
@hpcc-jirabot
Copy link

@ghalliday
Copy link
Member Author

@RussWhitehead please check the ldap change
@richardkchapman please review.

@HPCCSmoketest
Copy link
Contributor

Automated Smoketest
Sha: eb2b883
Build: success
ECL Watch: Rebuilding Site

errors warnings build time
0 65 91.019 seconds

Install hpccsystems-platform-community_6.2.5-closedown0.el7.x86_64.rpm
HPCC Start: OK

Unittest result:

total passed failed timeout
88 88 0 0

HPCC Stop: OK
HPCC Uninstall: OK

Copy link
Member

@RussWhitehead RussWhitehead left a comment

Choose a reason for hiding this comment

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

One minor question, otherwise looks good

char * oldtext = text;
text = (char *)malloc(_len+1);
memcpy(text, _text, _len);
text[_len] = 0;
Copy link
Member

Choose a reason for hiding this comment

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

curious why previous 3 lines are better than just calling strdup

Copy link
Member

Choose a reason for hiding this comment

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

Because it's not null-terminated

@richardkchapman richardkchapman merged commit b88ce07 into hpcc-systems:candidate-6.2.6 Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants