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

Florian Köberle florian at fkoeberle.de
Tue Mar 24 09:20:12 CDT 2009


---
 dlls/secur32/schannel.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c
index fbf2a62..4ef40a1 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)
     {
-- 
1.5.4.3




More information about the wine-patches mailing list