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
>From 0a3dd60144f2d268527a560987a5d359afedf59a Mon Sep 17 00:00:00 2001
From: Mike McCormack <[email protected]>
Date: Mon, 13 Dec 2010 16:23:58 +0900
Subject: [PATCH 2/2] Zero is a valid fd value

---
 trunk/ecore/src/lib/ecore_config/ecore_config.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/trunk/ecore/src/lib/ecore_config/ecore_config.c b/trunk/ecore/src/lib/ecore_config/ecore_config.c
index ddfc64f..d8b587e 100644
--- a/trunk/ecore/src/lib/ecore_config/ecore_config.c
+++ b/trunk/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);
-- 
1.7.0.4

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to