[PATCH] [cmd] - remove trailing spaces in WCMD_addCommand

Alexandre Julliard julliard at winehq.org
Fri Dec 22 09:49:33 CST 2017


Vijay Kiran Kamuju <infyquest at 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.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list