On Sat, 7 Nov 2009, Gustavo Sverzut Barbieri wrote:

On Sat, Nov 7, 2009 at 3:58 AM, Enlightenment SVN
<[email protected]> wrote:
Log:
 strdupa does not exist on BSD. Use simply strdup

Author:       caro
Date:         2009-11-06 21:58:01 -0800 (Fri, 06 Nov 2009)
New Revision: 43509

Modified:
 trunk/ecore/src/lib/ecore_con/ecore_con_url.c

Modified: trunk/ecore/src/lib/ecore_con/ecore_con_url.c
===================================================================
--- trunk/ecore/src/lib/ecore_con/ecore_con_url.c       2009-11-07 05:51:57 UTC 
(rev 43508)
+++ trunk/ecore/src/lib/ecore_con/ecore_con_url.c       2009-11-07 05:58:01 UTC 
(rev 43509)
@@ -776,7 +776,8 @@
     {
       char *tmp;

-       tmp = strdupa(filename);
+       tmp = strdup(filename);
+       if (!tmp) return 0;

       if (stat(filename, &file_info)) return 0;

leak!!! watch out such changes... if it does not provide that and
we're dealing with paths, then buf[PATH_MAX] is a better option.

indeed. Ok, i used a static buf instead

Vincent

       fd = fopen(filename, "rb");
@@ -796,6 +797,8 @@
       curl_easy_setopt(url_con->curl_easy, CURLOPT_READDATA, fd);
       ecore_con_url_url_set(url_con, url);

+       free(tmp);
+
       return _ecore_con_url_perform(url_con);
     }
   else


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
enlightenment-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-svn




--
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: [email protected]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to