FDOS / freecom

FreeDOS Command Shell (command.com)
http://www.freedos.org/
GNU General Public License v2.0
155 stars 38 forks source link

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

Open boeckmann opened 5 months ago

boeckmann commented 5 months ago

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 commented 5 months ago

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

PerditionC commented 5 days ago

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