Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ecore

Dir     : e17/libs/ecore/src/lib/ecore_desktop


Modified Files:
        ecore_desktop_paths.c 


Log Message:
- strdup paths so that we know we can write into it.

===================================================================
RCS file: /cvs/e/e17/libs/ecore/src/lib/ecore_desktop/ecore_desktop_paths.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ecore_desktop_paths.c       14 Aug 2006 10:22:51 -0000      1.4
+++ ecore_desktop_paths.c       14 Aug 2006 21:25:53 -0000      1.5
@@ -6,6 +6,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <libgen.h>
+#include <strings.h>
 
 #include <Ecore.h>
 
@@ -763,6 +764,7 @@
 ecore_desktop_paths_to_list(char *paths)
 {
    Ecore_List         *result;
+   char               *path;
 
    result = ecore_list_new();
    if (result)
@@ -774,7 +776,8 @@
             char               *start, *end, temp;
             int                 finished = 0;
 
-            end = paths;
+            path = strdup(paths);
+            end = path;
             while (!finished)
               {
                  start = end;
@@ -784,7 +787,7 @@
                              && (*end != '\0'))
                          end++;
                    }
-                 while ((end != paths) && (*(end - 1) == '\\') && (*end != 
'\0'));     /* Ignore any escaped ;:, */
+                 while ((end != path) && (*(end - 1) == '\\') && (*end != 
'\0'));      /* Ignore any escaped ;:, */
                  /* FIXME: We still need to unescape it now. */
                  temp = *end;
                  if (*end == '\0')
@@ -796,6 +799,7 @@
                     *end = temp;
                  end++;
               }
+            free(path);
          }
      }
    return result;



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to