mirror of
https://github.com/reactos/wine.git
synced 2025-01-26 05:54:34 +00:00
secur32: Sanity check handle index before indexing table.
This commit is contained in:
parent
7f64b8a9a9
commit
3a493d7782
@ -165,6 +165,7 @@ static void *schan_free_handle(ULONG_PTR handle_idx, enum schan_handle_type type
|
|||||||
void *object;
|
void *object;
|
||||||
|
|
||||||
if (handle_idx == SCHAN_INVALID_HANDLE) return NULL;
|
if (handle_idx == SCHAN_INVALID_HANDLE) return NULL;
|
||||||
|
if (handle_idx >= schan_handle_count) return NULL;
|
||||||
handle = &schan_handle_table[handle_idx];
|
handle = &schan_handle_table[handle_idx];
|
||||||
if (handle->type != type)
|
if (handle->type != type)
|
||||||
{
|
{
|
||||||
@ -185,6 +186,7 @@ static void *schan_get_object(ULONG_PTR handle_idx, enum schan_handle_type type)
|
|||||||
struct schan_handle *handle;
|
struct schan_handle *handle;
|
||||||
|
|
||||||
if (handle_idx == SCHAN_INVALID_HANDLE) return NULL;
|
if (handle_idx == SCHAN_INVALID_HANDLE) return NULL;
|
||||||
|
if (handle_idx >= schan_handle_count) return NULL;
|
||||||
handle = &schan_handle_table[handle_idx];
|
handle = &schan_handle_table[handle_idx];
|
||||||
if (handle->type != type)
|
if (handle->type != type)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user