From e1d8a1293d44015bb0894687d02c5c53339996f7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Florian=20K=C3=B6berle?= Date: Sat, 25 Jul 2009 15:39:56 +0200 Subject: [PATCH] secur32: Change scan_free_handle to print an error, if the index (handle) is out of range. -- picked from warcraft3.git http://bugs.winehq.org/show_bug.cgi?id=17809 --- dlls/secur32/schannel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c index 8f127e621b1..cf3c8eb0dde 100644 --- a/dlls/secur32/schannel.c +++ b/dlls/secur32/schannel.c @@ -165,6 +165,9 @@ static void *schan_free_handle(ULONG_PTR handle_idx, enum schan_handle_type type void *object; if (handle_idx == SCHAN_INVALID_HANDLE) return NULL; + if (handle_idx >= schan_handle_count) + ERR("Handle %ld is not in range [0,%ld]\n", handle_idx, schan_handle_count-1); + handle = &schan_handle_table[handle_idx]; if (handle->type != type) { -- 2.11.4.GIT