Enlightenment CVS committal
Author : ravenlock
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_file
Modified Files:
ecore_file.c
Log Message:
Check for null pointer before passing to realpath()
===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_file/ecore_file.c,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -3 -r1.73 -r1.74
--- ecore_file.c 26 Jan 2008 05:40:53 -0000 1.73
+++ ecore_file.c 17 Apr 2008 02:04:02 -0000 1.74
@@ -459,6 +459,11 @@
{
char buf[PATH_MAX];
+ /*
+ * Some implementations of realpath do not conform to the SUS.
+ * And as a result we must prevent a null arg from being passed.
+ */
+ if (!file) return strdup("");
if (!realpath(file, buf)) return strdup("");
return strdup(buf);
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs