forked from enlightenment/efl
ecore_x: ensure positive malloc size
size_ret is used later as an argument for malloc, so it should be positive. In addition this should ensure that ecore_x_window_porp_property_get returns a positive value and is true if we malloc data. Hopefully also fixes CID 1135636
This commit is contained in:
parent
3047ec4d91
commit
50569a69c9
|
@ -545,7 +545,7 @@ ecore_x_window_prop_property_get(Ecore_X_Window win,
|
|||
if (_ecore_xlib_sync) ecore_x_sync();
|
||||
if (ret != Success)
|
||||
return 0;
|
||||
if (!num_ret)
|
||||
if ((!num_ret) || (size_ret <= 0))
|
||||
{
|
||||
XFree(prop_ret);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue