From 67c261a8afa3b80c7927bee70f58f9dcd600fe03 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Mon, 24 Jan 2011 01:59:09 +0000 Subject: [PATCH] From: Mike McCormack ecore_config code may end up closing stdin, due to assuming 0 is a valid fd. I know this code is deprecated, and it's being kept around "for reference". Either: A) this bug should still be fixed so bad code is not copied elsewhere OR B) ecore_config should be deleted so bad code is not copied elsewhere thanks, Mike SVN revision: 56275 --- legacy/ecore/src/lib/ecore_config/ecore_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/legacy/ecore/src/lib/ecore_config/ecore_config.c b/legacy/ecore/src/lib/ecore_config/ecore_config.c index ddfc64f286..d8b587e9b6 100644 --- a/legacy/ecore/src/lib/ecore_config/ecore_config.c +++ b/legacy/ecore/src/lib/ecore_config/ecore_config.c @@ -1636,7 +1636,7 @@ ecore_config_init_global(const char *name) snprintf(buf, PATH_MAX, "%s/.ecore/%s/.global", p, name); global = creat(buf, S_IRWXU); - if (global) + if (global >= 0) close(global); free(buf);