[PATCH 1/2] secur32: Change scan_free_handle to print an error, if the index (handle) is out of range.

Francois Gouget fgouget at free.fr
Tue Mar 24 08:42:35 CDT 2009


On Tue, 24 Mar 2009, Florian Köberle wrote:
[...]
> +    if (handle_idx < 0 || handle_idx >= schan_handle_count)
> +    {
> +        ERR("Handle %ld is not in range [0,%ld]\n", handle_idx, schan_handle_count-1);
> +        return NULL;
> +    }

A conformance test to show that Windows has this check would be nice. 
Otherwise this patch is just for hiding a bug and thus should not be 
committed. But really, finding out why this API gets called with an 
invalid handle would be much better... (likely harder too, I know)


-- 
Francois Gouget <fgouget at free.fr>              http://fgouget.free.fr/
              Linux: Because rebooting is for adding new hardware


More information about the wine-devel mailing list