On 11/11/11 14:27, Christopher Michael wrote:
> On 11/11/11 14:13, Vincent Torri wrote:
>>
>>
>> On Fri, 11 Nov 2011, Enlightenment SVN wrote:
>>
>>> Log:
>>> Ecore_X: If malloc fails (when trying to get a window property list),
>>>    then return -1 to indicate failure. Add some missing parens in the
>>>    formatting.
>>>
>>>
>>>
>>> Author:       devilhorns
>>> Date:         2011-11-11 11:11:35 -0800 (Fri, 11 Nov 2011)
>>> New Revision: 65074
>>> Trac:         http://trac.enlightenment.org/e/changeset/65074
>>>
>>> Modified:
>>>    trunk/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c
>>>
>>> Modified: trunk/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c
>>> ===================================================================
>>> --- trunk/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c  2011-11-11 
>>> 18:51:53 UTC (rev 65073)
>>> +++ trunk/ecore/src/lib/ecore_x/xlib/ecore_x_window_prop.c  2011-11-11 
>>> 19:11:35 UTC (rev 65074)
>>> @@ -118,13 +118,18 @@
>>>                             &bytes_after,&prop_ret) != Success)
>>>        return -1;
>>>
>>> -   if (type_ret != XA_CARDINAL || format_ret != 32)
>>> +   if ((type_ret != XA_CARDINAL) || (format_ret != 32))
>>>        num = -1;
>>> -   else if (num_ret == 0 || !prop_ret)
>>> +   else if ((num_ret == 0) || (!prop_ret))
>>>        num = 0;
>>>      else
>>>        {
>>>           val = malloc(num_ret * sizeof(unsigned int));
>>> +        if (!val)
>>> +          {
>>> +             if (prop_ret) XFree(prop_ret);
>>> +             return -1;
>>> +          }
>>>           for (i = 0; i<   num_ret; i++)
>>>             val[i] = ((unsigned long *)prop_ret)[i];
>>
>> val is an array of unsigned int. Problem on 64 bits if you use long
>>
>> Vincent
>>
> Indeed :)
>
> As stated in a different email, I have no problems w/ the patch..good
> catch :)
>
> dh
>
Sorry, wrong reply. I see what you meant now. Fixed in svn ;)

dh

>>>           num = num_ret;


------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to