[1/4](try 2)wininet: parse cookie information from cookie value

Alexandre Julliard julliard at winehq.org
Tue Feb 17 08:14:07 CST 2009


Aric Stewart <aric at codeweavers.com> writes:

> +        ptr = strchrW(ptr,';');
> +        *ptr = 0;
> +        ptr++;
> +        while (*ptr == ' ') ptr++; /* whitespace */
> +        /* FIXME use LOCALE_INVARIANT when implemented */
> +        if (CompareStringW(MAKELCID(LANG_ENGLISH, SUBLANG_DEFAULT),
> +                    NORM_IGNORECASE, ptr, 6, szDomain, 6) == 2)

You need to check that the next char is a valid terminator
(probably '=', not sure if other values are possible). Also using
strncmpiW would make the code more readable.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list