forked from enlightenment/efl
ecore_x: Only do memset if len < 20
If len is 20, n is 0, and nothing to memset. Fixes CID 1039311
This commit is contained in:
parent
aca33ef3d9
commit
6b1438af05
|
@ -1967,7 +1967,8 @@ ecore_x_client_message8_send(Ecore_X_Window win,
|
||||||
len = 20;
|
len = 20;
|
||||||
|
|
||||||
memcpy(xev.xclient.data.b, data, len);
|
memcpy(xev.xclient.data.b, data, len);
|
||||||
memset(xev.xclient.data.b + len, 0, 20 - len);
|
if (len < 20)
|
||||||
|
memset(xev.xclient.data.b + len, 0, 20 - len);
|
||||||
|
|
||||||
ret = !!XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev);
|
ret = !!XSendEvent(_ecore_x_disp, win, False, NoEventMask, &xev);
|
||||||
if (_ecore_xlib_sync) ecore_x_sync();
|
if (_ecore_xlib_sync) ecore_x_sync();
|
||||||
|
|
Loading…
Reference in New Issue