zowe / launcher

Eclipse Public License 2.0
0 stars 4 forks source link

Appending the copied env string with NULL character before trimming. #118

Closed Gautham-coder closed 3 months ago

Gautham-coder commented 3 months ago

In module 'env_comp()', when copying the environment variable string, the trimRight() function is being called immediately after copying the bytes equivalent to the length of the string.

The trimRight() function removes the spaces if any and then appends the NULL character, but this doesn't happen with strings that have no spaces in them, hence we add the NULL character before we send the string to be trimmed.

Related to PR: https://github.com/zowe/launcher/pull/115/