Vijay Kiran Kamuju infyquest@gmail.com writes:
@@ -1680,15 +1680,17 @@ static void WCMD_addCommand(WCHAR *command, int *commandLen, CMD_LIST **lastEntry, CMD_LIST **output) {
CMD_LIST *thisEntry = NULL;
- WCHAR *trimcmd = WCMD_strtrim(command);
- int trimlen = strlenW(trimcmd);
The string is not null-terminated, so WCMD_strtrim is probably not the right thing. Also you are leaking the string. This could also use some test cases.