[PATCH 1/3] mpr: Implement remembered connection enumeration.

Alexandre Julliard julliard at winehq.org
Mon Nov 5 03:55:14 CST 2018


Pierre Schweitzer <pierre at reactos.org> writes:

> +        if (RegQueryInfoKeyW(remembered, NULL, NULL, NULL, NULL, &size, NULL, NULL, NULL, NULL, NULL, NULL) != ERROR_SUCCESS)
> +        {
> +            HeapFree(GetProcessHeap(), 0, ret);
> +            ret = NULL;
> +        }
> +
> +        ret->specific.remembered.len = size + 1;

That error handling can't possibly work. Also using RegQueryInfoKeyW()
to size buffers is always a bug, the registry contents can change in the
meantime.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list