Fix incorrect memset call on an std::string
Summary of the Pull Request
This pull request corrects an incorrect call to memset, writing zeroes in an std::string instead of simply calling clear()
PR Checklist
- [X] Closes: Link to issue #xxx
- [ ] Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
- [ ] Tests: Added/updated if needed and all pass
- [ ] Localization: All end user facing strings can be localized
- [ ] Dev docs: Added/updated if needed
- [ ] Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx
Detailed Description of the Pull Request / Additional comments
This was originally caught by theoparis, see https://github.com/microsoft/WSL/discussions/12927
Validation Steps Performed
Ran the tests
@OneBlue - looks like pipelines aren't getting triggered.
@OneBlue - looks like pipelines aren't getting triggered.
Yeah I'm still working on it
There is another similar compiler warning with memset probably.
src/linux/init/init.cpp:1075:12: warning: first argument in call to 'memset' is a pointer to non-trivially copyable type 'struct _CREATE_PROCESS_PARSED' [-Wnontrivial-memcall]
There is another similar compiler warning with memset probably.
src/linux/init/init.cpp:1075:12: warning: first argument in call to 'memset' is a pointer to non-trivially copyable type 'struct _CREATE_PROCESS_PARSED' [-Wnontrivial-memcall]
Yes this is similar, I'll take a look in a separate PR.
There is another similar compiler warning with memset probably.
src/linux/init/init.cpp:1075:12: warning: first argument in call to 'memset' is a pointer to non-trivially copyable type 'struct _CREATE_PROCESS_PARSED' [-Wnontrivial-memcall]Yes this is similar, I'll take a look in a separate PR.
Ended up adding it to this PR