From 7bc72d092fefdeb3e377f7ed0add5ddf3bd7ec58 Mon Sep 17 00:00:00 2001 From: Joona Kiiski Date: Thu, 10 Dec 2009 16:21:06 +0200 Subject: [PATCH] Fix overflow risk in split point Sizeof of search stack should be PLY_MAX+2 instead of PLY_MAX. Signed-off-by: Marco Costalba --- src/thread.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/thread.h b/src/thread.h index 5c169ee9..fd28ddf7 100644 --- a/src/thread.h +++ b/src/thread.h @@ -46,7 +46,7 @@ const int THREAD_MAX = 8; struct SplitPoint { SplitPoint *parent; Position pos; - SearchStack sstack[THREAD_MAX][PLY_MAX]; + SearchStack sstack[THREAD_MAX][PLY_MAX_PLUS_2]; SearchStack *parentSstack; int ply; Depth depth; -- 2.39.2