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

quote CMDLINE env var exe name if needed, fix memory leak in expandEnvVars, memory corruption in set command #104

Merged
merged 10 commits into from
Dec 22, 2024

Conversation

boeckmann
Copy link
Contributor

Please review line 218. I am not 100% sure if the +3 in the allocation is correct. This should leave space for two quotation marks and the terminating zero. But previously it was +2 without adding the space for the quotation marks. I do not know where the +2 came from. I think +1 for the terminating zero would have been enough.

Referencing #97

@ecm-pushbx
Copy link
Contributor

Seems correct. I want to do more tests on this, especially wrt separators other than blanks and what MSW 98 SE does for those.

@boeckmann boeckmann changed the title make sure CMDLINE env var executable name is surrounded by quotation marks if needed quote CMDLINE env var exe name if needed, fix memory leak in expandEnvVars, memory corruption in set command Jul 6, 2024
@boeckmann boeckmann marked this pull request as ready for review July 6, 2024 21:27
@PerditionC
Copy link
Contributor

I haven't had a chance to test, but once it gets reviewed (assuming nothing comes up), it should be merged.

@PerditionC
Copy link
Contributor

Please review line 218. I am not 100% sure if the +3 in the allocation is correct. This should leave space for two quotation marks and the terminating zero. But previously it was +2 without adding the space for the quotation marks. I do not know where the +2 came from. I think +1 for the terminating zero would have been enough.

Referencing #97

Yes +1 is all that was required, the +2 was probably an error that didn't hurt (well could in a rare situation where memory very very tight have caused an out of memory error) so never corrected.

@PerditionC PerditionC merged commit b3f0b7a into FDOS:master Dec 22, 2024
1 check passed
@boeckmann boeckmann deleted the 0.85_fixes branch December 23, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants