secur32: check for variable before freeing it

Austin English austinenglish at gmail.com
Wed Oct 14 11:56:53 CDT 2009


On Wed, Oct 14, 2009 at 4:07 AM, Henri Verbeet <hverbeet at gmail.com> wrote:
> 2009/10/14 Austin English <austinenglish at gmail.com>:
>>
>> static void *schan_free_handle(ULONG_PTR handle_idx, enum
>> schan_handle_type type)
>> {
>>    struct schan_handle *handle;
>>    void *object;
>>
>>    if (handle_idx == SCHAN_INVALID_HANDLE) return NULL;
>>    if (handle_idx >= schan_handle_count) return NULL;
>>
>> Seems NULL comes from 'handle_idx >= schan_handle_count'.
>>
> How does the attached patch work?
>

Works here, thanks.

-- 
-Austin



More information about the wine-devel mailing list