From 7e9ca02d2427c59cf04b2e9a61010ed5658c2016 Mon Sep 17 00:00:00 2001 From: Eric Mullins Date: Thu, 1 Oct 2009 16:50:28 -0600 Subject: [PATCH] Fixed bug dereferencing garbage, causing crash. Commit fa8be4a3fc5d81e9ec1f6c218fcf55c95d34fd10 included code to free the resultDetails of the gameInfo structure. That exact code exists a few lines above where it was added. None of these free() calls finish by setting the member to NULL afterword, therefore repeated attempts to test/free() the members result in an attempt to free() memory winboard no longer owns, and an eventual crash. link to problematic commit: http://git.savannah.gnu.org/cgit/xboard.git/commit/?id=fa8be4a3fc5d81e9ec1f6c218fcf55c95d34fd10 --- gamelist.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) mode change 100644 => 100755 gamelist.c diff --git a/gamelist.c b/gamelist.c old mode 100644 new mode 100755 index 7775a99..da123a4 --- a/gamelist.c +++ b/gamelist.c @@ -317,10 +317,6 @@ void ClearGameInfo(gameInfo) if (gameInfo->outOfBook != NULL) { free(gameInfo->outOfBook); } - if (gameInfo->resultDetails != NULL) { - free(gameInfo->resultDetails); - } - GameListInitGameInfo(gameInfo); } -- 1.7.0.4